home *** CD-ROM | disk | FTP | other *** search
/ Suzy B Software 2 / Suzy B Software CD-ROM 2 (1994).iso / new_file / fontwork / pgsmodst / atariprt.lzh / PSCRIPT.S < prev    next >
Encoding:
Text File  |  1991-08-12  |  74.5 KB  |  3,820 lines

  1.  include "pdlequ.h"
  2.  include "equ.h"
  3.  
  4. *
  5. * these equates are for the postscript driver
  6. *
  7. CR    equ    $d
  8. LF    equ    $a
  9. FF    equ    $c
  10. ESC    equ    $1b
  11. QUOTE    equ    $22
  12. BACK    equ    "\\"
  13.  
  14.  SECTION printer,CODE,PUBLIC
  15. ***************************************************************
  16. ***************************************************************
  17. ***************************************************************
  18. dumbentry:
  19.     clr.l    d0
  20.     rts
  21.  
  22.     dc.l    "PRNT"
  23.     dc.w    201
  24.  
  25. *
  26. * distribute the calls the the appropriate routines
  27. *
  28. postscrp:
  29.     move.l    a0,table
  30.     cmp.w    #10,d0
  31.     bcs    ps1
  32.     cmp.l    #-2,mfpage
  33.     beq    rrts
  34.     cmp.l    #-2,mapage
  35.     beq    rrts
  36. ps1:    lsl.w    #2,d0
  37.     lea    prntbl,a1
  38.     move.l    0(a1,d0.w),a1
  39.     jmp    (a1)
  40.  
  41. *******************************************************************
  42. ***                                ***
  43. *******************************************************************
  44. *
  45. * identify who I am, and set up who I like to speak to, and
  46. *  load in my device driver
  47. *
  48. p_ident:
  49.     move.l    #driver,pdrvrnm(a0)    ;pointer to string for driver name
  50.     move.w    #SERIAL+ASCENDING,device(a0)
  51. prtok:    moveq    #1,d0
  52. rrts:    rts
  53.  
  54.  
  55. *******************************************************************
  56. ***                                ***
  57. *******************************************************************
  58. *
  59. * initialize the table of printer specific routines
  60. *
  61. p_init:
  62.     move.b    #1,pmult(a0)        ;automatically print mulitiple copies?
  63.     move.l    curfm(a0),curfmetric
  64.     move.l    curft(a0),curfont
  65.     move.l    ftlist(a0),fontlist
  66.     move.l    ftoff(a0),fontoff
  67.     move.l    textattr(a0),attribute
  68.     move.l    sendout(a0),send+2    ;self-modifing code, tisk, tisk!
  69.     move.b    #1,pdl(a0)        ;a page description language printer
  70.     move.w    #72,pxdpi(a0)        ;x resolution
  71.     move.w    #72,pydpi(a0)        ;y resolution
  72.     clr.w    pxover(a0)
  73.     clr.w    pyover(a0)
  74.     move.w    #1,prowht(a0)
  75.  
  76. *
  77. * pminlft and pmaxw must be evenly divisible by 16
  78. *
  79.     move.w    #0,pminlft(a0)        ;pixels from the left
  80.     move.w    #0,pminrht(a0)        ;pixels from the right
  81.     move.w    #0,pmintop(a0)        ;pixels down from top
  82.     move.w    #0,pminbot(a0)        ;pixels up from bottom
  83.     move.l    #72000,pmaxw(a0)    ;maximum # pixels across
  84.     move.l    #0,pmaxh(a0)        ;maximum # pixels down
  85.     move.b    #1,pman(a0)        ;handle manual feed?
  86.     move.w    #%1000000000011100,pfont(a0)    ;which font types
  87.     bra    prtok
  88.  
  89. *******************************************************************
  90. ***                                ***
  91. *******************************************************************
  92. *
  93. * going to begin printing a document
  94. *
  95. p_bgndoc:
  96.     clr.b    downflag
  97.     clr.b    colorprt
  98.     clr.b    auto_unload
  99.  
  100.     lea    clrstr,a1
  101.     bsr    matchstr
  102.     beq    pbgn0
  103.     move.b    #1,colorprt
  104.  
  105. pbgn0:    lea    austr,a1
  106.     bsr    matchstr
  107.     beq    pbgn1
  108.     move.b    #3,auto_unload
  109.  
  110. pbgn1:    lea    pustr,a1
  111.     bsr    matchstr
  112.     beq    pbgn1e
  113.     or.b    #2,auto_unload
  114.  
  115. pbgn1e:    move.l    #-1,bleedh
  116.     move.l    #-1,bleedv
  117.     lea    bldstr,a1
  118.     bsr    matchstr
  119.     beq    pbgn5
  120.     bsr    getnum
  121.     move.l    d0,bleedh
  122.     move.l    d0,bleedv
  123.     cmp.b    #",",(a0)+
  124.     bne    pbgn5
  125.     bsr    getnum
  126.     move.l    d0,bleedv
  127.  
  128. pbgn5:    move.l    #-1,mfreq
  129.     move.w    #1,mfcount
  130.     clr.w    mfcur
  131.     lea    freqstr,a1
  132.     bsr    matchstr
  133.     beq    pbgn2
  134.     clr.w    mfcount
  135.     bra    pbgn1b
  136.  
  137. pbgn1a:    move.b    (a0)+,d0
  138.     cmp.b    #",",d0
  139.     beq    pbgn1b
  140.     cmp.b    #"]",d0
  141.     beq    pbgn2
  142.     bra    pbgn1a
  143.  
  144. pbgn1b:    cmp.b    #"-",(a0)
  145.     bne    pbgn1c
  146.     lea    mfreq,a1
  147.     move.w    mfcount,d0
  148.     lsl.w    #2,d0
  149.     move.l    #-1,0(a1,d0.w)
  150.     addq.w    #1,mfcount
  151.     bra    pbgn1a
  152.  
  153. pbgn1c:    cmp.b    #"s",(a0)
  154.     bne    pbgn1d
  155.     lea    mfreq,a1
  156.     move.w    mfcount,d1
  157.     lsl.w    #2,d1
  158.     move.l    #-2,0(a1,d1.w)
  159.     addq.w    #1,mfcount
  160.     bra    pbgn1a
  161.  
  162. pbgn1d:    cmp.b    #"9",(a0)
  163.     bhi    pbgn1a
  164.     cmp.b    #"0",(a0)
  165.     bcs    pbgn1a
  166.     lea    mfreq,a1
  167.     move.w    mfcount,d1
  168.     lsl.w    #2,d1
  169.     move.l    a0,0(a1,d1.w)
  170.     addq.w    #1,mfcount
  171.     bra    pbgn1a
  172.  
  173. pbgn2:    move.l    #-1,mangle
  174.     move.w    #1,macount
  175.     clr.w    macur
  176.     lea    anglestr,a1
  177.     bsr    matchstr
  178.     beq    pbgn3
  179.     clr.w    macount
  180.     bra    pbgn2b
  181.  
  182. pbgn2a:    move.b    (a0)+,d0
  183.     cmp.b    #",",d0
  184.     beq    pbgn2b
  185.     cmp.b    #"]",d0
  186.     beq    pbgn3
  187.     bra    pbgn2a
  188.  
  189. pbgn2b:    cmp.b    #"-",(a0)
  190.     bne    pbgn2c
  191.     lea    mangle,a1
  192.     move.w    macount,d0
  193.     lsl.w    #2,d0
  194.     move.l    #-1,0(a1,d0.w)
  195.     addq.w    #1,macount
  196.     bra    pbgn2a
  197.  
  198. pbgn2c:    cmp.b    #"s",(a0)
  199.     bne    pbgn2d
  200.     lea    mangle,a1
  201.     move.w    macount,d1
  202.     lsl.w    #2,d1
  203.     move.l    #-2,0(a1,d1.w)
  204.     addq.w    #1,macount
  205.     bra    pbgn2a
  206.  
  207. pbgn2d:    cmp.b    #"9",(a0)
  208.     bhi    pbgn2a
  209.     cmp.b    #"0",(a0)
  210.     bcs    pbgn2a
  211.     lea    mangle,a1
  212.     move.w    macount,d1
  213.     lsl.w    #2,d1
  214.     move.l    a0,0(a1,d1.w)
  215.     addq.w    #1,macount
  216.     bra    pbgn2a
  217.  
  218. pbgn3:    bsr    nofonts
  219.  
  220. *
  221. *
  222. *
  223.     lea    _comments,a0
  224.     bsr    sendline
  225.  
  226.     lea    _bbcomment,a0
  227.     bsr    sendline
  228.  
  229.     moveq    #0,d0
  230.     moveq    #0,d1
  231.     bsr    send2n
  232.  
  233.     move.l    table,a0
  234.     move.l    PDocumentW(a0),d0
  235.     move.l    PDocumentH(a0),d1
  236.     bsr    send2n
  237.  
  238.     bsr    sendcrlf
  239.  
  240.     lea    _npcomment,a0
  241.     bsr    sendline
  242.  
  243.     lea    _dfcomment,a0
  244.     bsr    sendline
  245.  
  246.     lea    _dnfcomment,a0
  247.     bsr    sendline
  248.  
  249.     lea    _dsfcomment,a0
  250.     bsr    sendline
  251.  
  252.     lea    _prolog,a0
  253.     bra    sendline
  254.  
  255. nofonts:
  256.     move.l    table,a0
  257.     move.w    pfont(a0),d0
  258.     move.l    ftcnt(a0),a1
  259.     move.w    (a1),d7
  260.     move.l    ftlist(a0),a1
  261.     move.l    (a1),a1
  262.     move.l    (a1),a1
  263.     bra    pbgnd3
  264. pbgnd1:    move.w    ft_Type(a1),d1
  265.     btst    d1,d0
  266.     beq    pbgnd2
  267.     clr.w    ft_Flag(a1)
  268. pbgnd2:    lea    ft_Sizeof(a1),a1
  269. pbgnd3:    dbf    d7,pbgnd1
  270.     rts
  271.  
  272. ***********************************
  273. ***                ***
  274. ***********************************
  275. matchstr:
  276.     move.l    table,a2
  277.     move.l    prtspcl(a2),a2
  278. mstr0:    move.l    a2,a0
  279.     move.l    a1,a3
  280.     tst.b    (a0)
  281.     beq    rrts        ;no match, return eq
  282. mstr1:    cmp.b    (a0)+,(a3)+
  283.     bne    mstr2
  284.     tst.b    (a3)
  285.     bne    mstr1
  286.     moveq    #1,d0
  287.     rts            ;return neq, a match
  288. mstr2:    addq.l    #1,a2
  289.     bra    mstr0
  290.  
  291.  
  292. ***********************************
  293. ***                ***
  294. ***********************************
  295. getnum:    moveq    #0,d0
  296. gnum1:    cmp.b    #"9",(a0)
  297.     bhi    rrts
  298.     cmp.b    #"0",(a0)
  299.     bcs    rrts
  300.     mulu    #10,d0
  301.     move.b    (a0)+,d1
  302.     sub.b    #"0",d1
  303.     and.w    #$ff,d1
  304.     add.w    d1,d0
  305.     bra    gnum1
  306.  
  307. *******************************************************************
  308. ***                                ***
  309. *******************************************************************
  310. *
  311. * about to start printing of a page
  312. *
  313. p_bgnpage:
  314.     move.w    pcyan(a0),p_cyan
  315.     move.w    pmagenta(a0),p_magenta
  316.     move.w    pyellow(a0),p_yellow
  317.     move.w    pblack(a0),p_black
  318.  
  319.     lea    mfreq,a0
  320.     move.w    mfcur,d0
  321.     cmp.w    mfcount,d0
  322.     bcs    pbp1
  323.     clr.w    mfcur
  324.     moveq    #0,d0
  325. pbp1:    lsl.w    #2,d0
  326.     move.l    0(a0,d0.w),mfpage
  327.     addq.w    #1,mfcur
  328.  
  329.     lea    mangle,a0
  330.     move.w    macur,d0
  331.     cmp.w    macount,d0
  332.     bcs    pbp2
  333.     clr.w    macur
  334.     moveq    #0,d0
  335. pbp2:    lsl.w    #2,d0
  336.     move.l    0(a0,d0.w),mapage
  337.     addq.w    #1,macur
  338.  
  339.     cmp.l    #-2,mapage
  340.     beq    rrts
  341.     cmp.l    #-2,mfpage
  342.     beq    rrts
  343.  
  344.     lea    _bgnpage,a0
  345.     bra    sendline
  346.  
  347. *******************************************************************
  348. ***                                ***
  349. *******************************************************************
  350. *
  351. * about to print a new tile for the page
  352. *
  353. p_bgntile:
  354.     cmp.l    #-2,mapage
  355.     beq    rrts
  356.     cmp.l    #-2,mfpage
  357.     beq    rrts
  358.  
  359.     btst    #1,auto_unload
  360.     beq    btpu1
  361.     lea    _bgnpgu,a0
  362.     jsr    sendline
  363.  
  364. btpu1:    move.l    table,a0
  365.     move.l    VDocumentH(a0),d0
  366.     tst.b    pland(a0)
  367.     beq    bgt1
  368.     move.l    VDocumentW(a0),d0
  369. bgt1:    move.l    d0,yinvert
  370.  
  371.     lea    _bgntile,a0
  372.     bsr    sendline
  373.  
  374.     move.b    #"(",d0
  375.     bsr    send
  376.     move.l    table,a0
  377.     lea    pagetitle(a0),a0
  378.     bsr    sendline
  379.     move.b    #")",d0
  380.     bsr    send
  381.     bsr    sendcrlf
  382.  
  383.     move.l    table,a0
  384.     move.w    psepmode(a0),d0
  385.     bsr    sendi
  386.  
  387.     move.w    p_cyan,d0
  388.     move.w    p_magenta,d1
  389.     bsr    send2i
  390.  
  391.     move.l    table,a0
  392.     move.w    p_yellow,d0
  393.     move.w    p_black,d1
  394.     bsr    send2i
  395.  
  396.     move.l    table,a0
  397.     moveq    #0,d0
  398.     move.b    prvrs(a0),d0
  399.     bsr    sendi
  400.  
  401.     move.l    table,a0
  402.     moveq    #0,d0
  403.     move.b    pmirror(a0),d0
  404.     bsr    sendi
  405.  
  406.     move.l    table,a0
  407.     moveq    #0,d0
  408.     move.b    pcrop(a0),d0
  409.     bsr    sendi
  410.  
  411.     move.l    table,a0
  412.     moveq    #0,d0
  413.     move.b    pmanual(a0),d0
  414.     bsr    sendi
  415.  
  416.     move.l    table,a1
  417.     moveq    #0,d0
  418.     move.b    pland(a1),d0
  419.     bsr    sendi
  420.  
  421.     move.l    table,a0
  422.     move.w    pscale(a0),d0        ;x-scale
  423.     move.w    d0,d1            ;y-scale
  424.     bsr    send2i
  425.  
  426.     move.l    table,a0
  427.     move.w    pminlft(a0),d0
  428.     move.w    pmintop(a0),d1
  429.     bsr    send2i
  430.  
  431.     move.l    table,a0
  432.     move.l    PDocumentW(a0),d0
  433.     move.l    PDocumentH(a0),d1
  434.     bsr    send2n
  435.  
  436.     move.l    table,a0
  437.     move.l    PPageLeft(a0),d0
  438.     move.l    PPageTop(a0),d1
  439.     bsr    send2n
  440.  
  441.     move.l    table,a0
  442.     move.l    PPageWidth(a0),d0
  443.     move.l    PPageHeight(a0),d1
  444.     bsr    send2n
  445.  
  446.     move.l    bleedh,d0
  447.     move.l    bleedv,d1
  448.     bsr    send2n
  449.  
  450.     cmp.l    #-2,mfpage
  451.     beq    spclf
  452.     cmp.l    #-1,mfpage
  453.     beq    spclf
  454.     move.l    mfpage,a0
  455. sfq1:    move.b    (a0)+,d0
  456.     cmp.b    #".",d0
  457.     beq    sfq2
  458.     cmp.b    #"0",d0
  459.     bcs    sfq3
  460.     cmp.b    #"9",d0
  461.     bhi    sfq3
  462. sfq2:    move.l    a0,-(sp)
  463.     jsr    send
  464.     move.l    (sp)+,a0
  465.     bra    sfq1
  466. sfq3:    move.b    #" ",d0
  467.     bsr    send
  468.     bra    setfq
  469. spclf:    move.w    mfpage+2,d0
  470.     bsr    sendi
  471.  
  472. setfq:    cmp.l    #-2,mapage
  473.     beq    spcla
  474.     cmp.l    #-1,mapage
  475.     beq    spcla
  476.     move.l    mapage,a0
  477. saq1:    move.b    (a0)+,d0
  478.     cmp.b    #".",d0
  479.     beq    saq2
  480.     cmp.b    #"0",d0
  481.     bcs    saq3
  482.     cmp.b    #"9",d0
  483.     bhi    saq3
  484. saq2:    move.l    a0,-(sp)
  485.     jsr    send
  486.     move.l    (sp)+,a0
  487.     bra    saq1
  488. saq3:    move.b    #" ",d0
  489.     bsr    send
  490.     bra    setan
  491.  
  492. spcla:    move.w    mapage+2,d0
  493.     bsr    sendi
  494.  
  495. setan:    move.l    table,a0
  496.     move.w    pcopies(a0),d0
  497.     bsr    sendi
  498.  
  499.     lea    _bgntile2,a0
  500.     bra    sendline
  501.  
  502.  
  503. *******************************************************************
  504. ***                                ***
  505. *******************************************************************
  506. *
  507. * just finished describing current tile
  508. *
  509. p_endtile:
  510.     cmp.l    #-2,mapage
  511.     beq    rrts
  512.     cmp.l    #-2,mfpage
  513.     beq    rrts
  514.  
  515.     btst    #1,auto_unload
  516.     beq    etpgu1
  517.     bsr    flushfont
  518.     bsr    nofonts
  519. etpgu1:    lea    _endtile,a0
  520.     bsr    sendline
  521.  
  522.     btst    #1,auto_unload
  523.     beq    rrts
  524.     move.l    #$7fffffff,curx
  525.     move.l    #$7fffffff,cury
  526.     lea    _endpgu,a0
  527.     bra    sendline
  528.  
  529. *******************************************************************
  530. ***                                ***
  531. *******************************************************************
  532. *
  533. * just finished describing all tiles for this page
  534. *
  535. p_endpage:
  536.     cmp.l    #-2,mapage
  537.     beq    rrts
  538.     cmp.l    #-2,mfpage
  539.     beq    rrts
  540.  
  541.     lea    _endpage,a0
  542.     bra    sendline
  543.  
  544. *******************************************************************
  545. ***                                ***
  546. *******************************************************************
  547. p_enddoc:
  548.     lea    _enddoc,a0
  549.     bra    sendline
  550.  
  551.  
  552. *******************************************************************
  553. ***                                ***
  554. *******************************************************************
  555. p_break:
  556.     move.b    #4,d0
  557.     bra    send
  558.  
  559.  
  560.  
  561. *******************************************************************
  562. ***                                ***
  563. *******************************************************************
  564. setcolor:
  565.     move.w    pblockx(a0),cyan
  566.     move.w    pblocky(a0),magenta
  567.     move.w    pblockw(a0),yellow
  568.     move.w    pblockh(a0),black
  569.  
  570.     move.w    pblockptr(a0),cintensity
  571.     bra    prtok
  572.  
  573.  
  574. *******************************************************************
  575. ***                                ***
  576. *******************************************************************
  577. rotate:
  578.     clr.b    bgnstyle
  579.     clr.b    endstyle
  580.     move.w    pblockw(a0),d0
  581.     move.w    pblockh(a0),d1
  582.     bsr    send2i
  583.     move.l    table,a0
  584.     move.l    pblockx(a0),d0
  585.     move.l    pblocky(a0),d1
  586.     bsr    sendxy
  587.     lea    _setscl,a0
  588.     bra    sendline
  589.  
  590.  
  591. *******************************************************************
  592. ***                                ***
  593. *******************************************************************
  594. setfill:
  595.     move.w    pblockx(a0),fillstyle    ;fill style
  596.  
  597.     move.w    fillstyle,d0
  598.     tst.b    d0
  599.     bpl    setfl1
  600.     and.w    #$7f,d0
  601.     bra    setfl2
  602. setfl1:    lea    f_tbl,a0
  603.     move.b    0(a0,d0.w),d0        ;if minus, then use a pattern
  604.     bmi    setfl4
  605. *
  606. * (color/grey) shade fill
  607. *
  608. setfl2:    tst.b    colorprt
  609.     beq    setfl3
  610.     move.l    table,a0
  611.     tst.w    psepmode(a0)
  612.     bne    setfl3
  613. *
  614. * color shade fill
  615. *
  616.     move.w    d0,-(sp)
  617.     mulu    cyan,d0
  618.     divu    #100,d0
  619.     bsr    sendi
  620.     move.w    (sp),d0
  621.     mulu    magenta,d0
  622.     divu    #100,d0
  623.     bsr    sendi
  624.     move.w    (sp),d0
  625.     mulu    yellow,d0
  626.     divu    #100,d0
  627.     bsr    sendi
  628.     move.w    (sp)+,d0
  629.     mulu    black,d0
  630.     divu    #100,d0
  631.     bsr    sendi
  632.     lea    _setcmyk,a0
  633.     bra    sendline
  634. *
  635. * grey shade fill
  636. *
  637. setfl3:    mulu    cintensity,d0
  638.     divu    #100,d0
  639.     bsr    sendi
  640.     lea    _setshade,a0
  641.     bra    sendline
  642. *
  643. * pattern fill
  644. *
  645. setfl4:    and.w    #$7f,d0
  646.     lsl.w    #5,d0
  647.     move.l    table,a0
  648.     move.l    fillpat(a0),a0
  649.     add.w    d0,a0
  650.     move.l    a0,-(sp)
  651.     move.b    #"<",d0
  652.     bsr    send
  653.     move.l    (sp)+,a0
  654.     lea    32(a0),a0
  655.     move.w    #15,d7
  656. setfl5:    move.b    -2(a0),d0
  657.     move.w    d7,-(sp)
  658.     move.l    a0,-(sp)
  659.     bsr    sendh
  660.     move.l    (sp),a0
  661.     move.b    -1(a0),d0
  662.     subq.l    #2,a0
  663.     move.l    a0,(sp)
  664.     bsr    sendh
  665.     move.l    (sp)+,a0
  666.     move.w    (sp)+,d7
  667.     dbf    d7,setfl5
  668.     move.b    #">",d0
  669.     bsr    send
  670.     move.b    #" ",d0
  671.     bsr    send
  672.     move.w    cintensity,d0
  673.     bsr    sendi
  674.     lea    _setpattern,a0
  675.     bra    sendline
  676.  
  677.  
  678. *******************************************************************
  679. ***                                ***
  680. *******************************************************************
  681. setline:
  682.     move.l    table,a0
  683.     move.b    pblockh(a0),bgnstyle
  684.     move.b    pblockh+1(a0),endstyle
  685.     move.w    pblockw(a0),linewidth
  686.     move.w    pblockx(a0),linestyle
  687.  
  688.     move.w    #100,d0
  689.     bsr    setfl2            ;set solid fill (current color)
  690.     move.w    linewidth,d0        ;line width
  691.     bsr    sendi
  692.     move.l    table,a0
  693.     cmp.w    #7,linestyle
  694.     bne    stln1
  695.     bsr    setul
  696. stln1:    move.w    linestyle,d0
  697.     lsl.w    #2,d0
  698.     lea    lwdash,a0
  699.     move.l    0(a0,d0.w),a0
  700.     bsr    sendline
  701.     lea    _setline,a0
  702.     bra    sendline
  703.  
  704.  
  705. *
  706. * set up user defined line style
  707. *
  708. setul:    lea    lwd7+1,a0
  709.     moveq    #0,d7
  710.  
  711.     move.l    table,a1
  712.     move.l    linepat(a1),a1
  713.     move.w    14(a1),d0
  714.     bmi    stul2
  715.     beq    stul69
  716. stul1:    lsl.w    #1,d0
  717.     bpl    stul1
  718. stul2:    cmp.w    #$ffff,d0
  719.     beq    stul69
  720.     move.w    #15,d1
  721.     moveq    #0,d2
  722.     moveq    #1,d3
  723. stul3:    lsl.w    #1,d0
  724.     bcc    stul5
  725.     bset    #0,d3
  726.     beq    stul4
  727.     addq.w    #1,d2
  728.     dbf    d1,stul3
  729.     bsr    stulnum
  730.     bra    stul69
  731.  
  732. stul5:    bclr    #0,d3
  733.     bne    stul4
  734.     addq.w    #1,d2
  735.     dbf    d1,stul3
  736.     bsr    stulnum
  737.     bra    stul69
  738.  
  739. stul4:    bsr    stulnum
  740.     dbf    d1,stul3
  741.  
  742. stul69:    move.b    #"]",(a0)+
  743.     clr.b    (a0)
  744.     rts
  745.  
  746. stulnum:
  747.     addq.w    #1,d7
  748.     cmp.w    #11,d7
  749.     bcc    stuln2
  750.  
  751.     mulu    #5,d2
  752.     cmp.b    #10,d2
  753.     bcs    stuln1
  754.     move.b    #"1",(a0)+
  755. stuln0:    sub.b    #10,d2
  756.     cmp.b    #10,d2
  757.     bcs    stuln1
  758.     addq.b    #1,-1(a0)
  759.     bra    stuln0
  760. stuln1:    or.b    #"0",d2
  761.     move.b    d2,(a0)+
  762.     move.b    #"0",(a0)+
  763.     move.b    #" ",(a0)+
  764.     moveq    #1,d2
  765. stuln2:    rts
  766.  
  767.  
  768. *******************************************************************
  769. ***                                ***
  770. *******************************************************************
  771. newpath:
  772.     clr.b    eflag
  773.     clr.b    bflag
  774.     lea    _newpath,a0
  775.     bra    sendline
  776.  
  777.  
  778. *******************************************************************
  779. ***                                ***
  780. *******************************************************************
  781. closepath:
  782.     clr.b    eflag
  783.     clr.b    bflag
  784.     lea    _closepath,a0
  785.     bra    sendline
  786.  
  787.  
  788. *******************************************************************
  789. ***                                ***
  790. *******************************************************************
  791. fillpath:
  792.     lea    _fillpath,a0
  793.     bra    sendline
  794.  
  795.  
  796. *******************************************************************
  797. ***                                ***
  798. *******************************************************************
  799. strokepath:
  800.     cmp.b    #2,eflag
  801.     bne    strkp1
  802.  
  803.     moveq    #0,d0
  804.     move.b    endstyle,d0
  805.     bsr    sendi
  806.     move.l    ex1,d0
  807.     move.l    ey1,d1
  808.     bsr    sendxy
  809.     move.l    ex2,d0
  810.     move.l    ey2,d1
  811.     bsr    sendxy
  812.     clr.b    eflag
  813.     lea    _doendstroke,a0
  814.     bra    sendline
  815.  
  816. strkp1:    lea    _strokepath,a0
  817.     bra    sendline
  818.  
  819.  
  820. *******************************************************************
  821. ***                                ***
  822. *******************************************************************
  823. moveto:    move.l    pblockx(a0),d0
  824.     move.l    pblocky(a0),d1
  825.     tst.b    endstyle
  826.     beq    mvto1
  827.  
  828.     move.l    d0,ex1
  829.     move.l    d1,ey1
  830.     move.b    #1,eflag
  831.  
  832. mvto1:    tst.b    bgnstyle
  833.     beq    mvto2
  834.  
  835.     move.l    d0,bx1
  836.     move.l    d1,by1
  837.     move.b    #1,bflag
  838.     rts
  839.  
  840. mvto2:    bsr    sendxy
  841.     lea    _moveto,a0
  842.     bra    sendline
  843.  
  844.  
  845. *******************************************************************
  846. ***                                ***
  847. *******************************************************************
  848. lineto:    cmp.b    #1,bflag
  849.     bne    lnto1
  850.  
  851.     moveq    #0,d0
  852.     move.b    bgnstyle,d0
  853.     bsr    sendi
  854.     move.l    bx1,d0
  855.     move.l    by1,d1
  856.     bsr    sendxy
  857.     move.l    table,a0
  858.     move.l    pblockx(a0),d0
  859.     move.l    pblocky(a0),d1
  860.     bsr    sendxy
  861.     lea    _dobgnmoveto,a0
  862.     bsr    sendline
  863.     clr.b    bflag
  864.     move.l    table,a0
  865.  
  866. lnto1:    tst.b    endstyle
  867.     beq    lnto2
  868.     cmp.b    #2,eflag
  869.     bne    lnto3
  870.     move.l    ex1,d0
  871.     move.l    ey1,d1
  872.     bsr    sendxy
  873.     lea    _lineto,a0
  874.     bsr    sendline
  875.     move.l    table,a0
  876.  
  877. lnto3:    move.l    ex1,ex2
  878.     move.l    ey1,ey2
  879.     move.l    pblockx(a0),ex1
  880.     move.l    pblocky(a0),ey1
  881.     move.b    #2,eflag
  882.     rts
  883.  
  884. lnto2:    move.l    pblockx(a0),d0
  885.     move.l    pblocky(a0),d1
  886.     bsr    sendxy
  887.     lea    _lineto,a0
  888.     bra    sendline
  889.  
  890.  
  891. *******************************************************************
  892. ***                                ***
  893. *******************************************************************
  894. curveto:
  895.     tst.b    bflag
  896.     beq    crvto1
  897.  
  898.     move.l    bx1,d0
  899.     move.l    by1,d1
  900.     bsr    sendxy
  901.     lea    _moveto,a0
  902.     bsr    sendline
  903.     clr.b    bflag
  904.     move.l    table,a0
  905.  
  906. crvto1:    cmp.b    #2,eflag
  907.     bne    crvto2
  908.     move.l    ex1,d0
  909.     move.l    ey1,d1
  910.     bsr    sendxy
  911.     lea    _lineto,a0
  912.     bsr    sendline
  913.     move.l    table,a0
  914.     move.b    #1,eflag
  915.     move.l    table,a0
  916. *
  917. *
  918. crvto2:    move.l    pblockx(a0),d0
  919.     move.l    pblocky(a0),d1
  920.     bsr    sendxy
  921.     move.l    table,a0
  922.     move.l    pblockw(a0),d0
  923.     move.l    pblockh(a0),d1
  924.     bsr    sendxy
  925.     move.l    table,a0
  926.     move.l    pblockptr(a0),d0
  927.     move.l    pblockoff(a0),d1
  928.     bsr    sendxy
  929.     lea    _curveto,a0
  930.     bra    sendline
  931.  
  932.  
  933. *******************************************************************
  934. ***                                ***
  935. *******************************************************************
  936. arcto:    move.l    pblockx(a0),d0
  937.     move.l    pblocky(a0),d1
  938.     bsr    sendxy
  939.     move.l    table,a0
  940.     move.l    pblockw(a0),d0
  941.     move.l    pblockh(a0),d1
  942.     bsr    send2n
  943.     move.l    table,a0
  944.     move.w    pblockptr(a0),d0
  945.     move.w    pblockptr+2(a0),d1
  946.     bsr    send2i
  947.     lea    _arcto,a0
  948.     bra    sendline
  949.  
  950.  
  951.  
  952. *******************************************************************
  953. ***                                ***
  954. *******************************************************************
  955. arcnto:
  956.     move.l    pblockx(a0),d0
  957.     move.l    pblocky(a0),d1
  958.     bsr    sendxy
  959.     move.l    table,a0
  960.     move.l    pblockw(a0),d0
  961.     move.l    pblockh(a0),d1
  962.     bsr    send2n
  963.     move.l    table,a0
  964.     move.w    pblockptr(a0),d0
  965.     move.w    pblockptr+2(a0),d1
  966.     bsr    send2i
  967.     lea    _arcnto,a0
  968.     bra    sendline
  969.  
  970.  
  971.  
  972.  
  973. *******************************************************************
  974. ***                                ***
  975. *******************************************************************
  976. *
  977. * routines for putting text
  978. *
  979. putchar:
  980.     cmp.w    #1,curfmtype
  981.     beq    putchafm
  982.  
  983.     move.l    curfont,a0
  984.     tst.l    (a0)
  985.     beq    rrts
  986.  
  987.     bsr    putwidth
  988.  
  989.     cmp.w    #3,curftype
  990.     bne    putch3
  991. *
  992. * .PSF putchar routines
  993. *
  994.     move.l    curfont,a0
  995.     move.l    (a0),a0
  996.     move.l    (a0),a0
  997.     lea    PS_LOOKUP(a0),a0
  998.     move.w    (a0)+,count
  999.     bra    ptpsf4
  1000. ptpsf1:    move.b    (a0),d0
  1001.     cmp.b    pchar,d0
  1002.     bne    ptpsf3
  1003.     move.l    a0,-(sp)
  1004.  
  1005.     move.b    1(a0),char
  1006.     move.w    2(a0),d1
  1007.     move.w    4(a0),-(sp)
  1008.     move.l    attribute,a1
  1009.  
  1010.     move.l    xpoint(a1),d0
  1011.     bsr    Muls1632
  1012.     move.w    curpsxpoint,d2
  1013.     bsr    Divs1648
  1014.     move.w    #7200,d1
  1015.     bsr    Muls1632
  1016.     move.w    curpsxdpi,d2
  1017.     bsr    Divs1648
  1018.  
  1019.     add.l    pcx,d0
  1020.     move.l    d0,cx
  1021.  
  1022.     move.l    ypoint(a1),d0
  1023.     move.w    (sp)+,d1
  1024.     bsr    Muls1632
  1025.     move.w    curpsypoint,d2
  1026.     bsr    Divs1648
  1027.     move.w    #7200,d1
  1028.     bsr    Muls1632
  1029.     move.w    curpsydpi,d2
  1030.     bsr    Divs1648
  1031.  
  1032.     move.l    pattr,d2
  1033.     btst    #UPSIDE,d2
  1034.     beq    ptpsf2
  1035.     neg.l    d0
  1036. ptpsf2:    add.l    pcy,d0
  1037.     move.l    d0,cy
  1038.  
  1039.     bsr    drwchar
  1040.  
  1041.     move.l    (sp)+,a0
  1042. ptpsf3:    addq.l    #6,a0
  1043. ptpsf4:    subq.w    #1,count
  1044.     bcc    ptpsf1
  1045.     rts
  1046. *
  1047. * .DMF putchar routines
  1048. *
  1049. putch3:    cmp.w    #2,curftype
  1050.     bne    putch4
  1051.  
  1052.     move.l    curfont,a0
  1053.     move.l    (a0),a0
  1054.     move.l    (a0),a0
  1055.     lea    DM_LOOKUP(a0),a0
  1056.     move.w    (a0)+,count
  1057.     bra    ptdmf4
  1058. ptdmf1:    move.b    (a0),d0
  1059.     cmp.b    pchar,d0
  1060.     bne    ptdmf3
  1061.     move.l    a0,-(sp)
  1062.  
  1063.     move.b    1(a0),char
  1064.     move.w    2(a0),d1
  1065.     move.w    4(a0),-(sp)
  1066.     move.l    attribute,a1
  1067.  
  1068.     move.l    xpoint(a1),d0
  1069.     bsr    Muls1632
  1070.     move.w    curpsxpoint,d2
  1071.     bsr    Divs1648
  1072.     move.w    #7200,d1
  1073.     bsr    Muls1632
  1074.     move.w    curpsxdpi,d2
  1075.     bsr    Divs1648
  1076.  
  1077.     add.l    pcx,d0
  1078.     move.l    d0,cx
  1079.  
  1080.     move.l    ypoint(a1),d0
  1081.     move.w    (sp)+,d1
  1082.     bsr    Muls1632
  1083.     move.w    curpsypoint,d2
  1084.     bsr    Divs1648
  1085.     move.w    #7200,d1
  1086.     bsr    Muls1632
  1087.     move.w    curpsydpi,d2
  1088.     bsr    Divs1648
  1089.  
  1090.     move.l    pattr,d2
  1091.     btst    #UPSIDE,d2
  1092.     beq    ptdmf2
  1093.     neg.l    d0
  1094. ptdmf2:    add.l    pcy,d0
  1095.     move.l    d0,cy
  1096.  
  1097.     bsr    drwchar
  1098.  
  1099.     move.l    (sp)+,a0
  1100. ptdmf3:    addq.l    #6,a0
  1101. ptdmf4:    subq.w    #1,count
  1102.     bcc    ptdmf1
  1103.     rts
  1104.  
  1105. *
  1106. * Adobe Type 1 .pfb putchar routine
  1107. *
  1108. putch4:    cmp.w    #4,curftype
  1109.     bne    rrts
  1110.  
  1111.     lea    t1index,a0
  1112.     moveq    #0,d0
  1113.     move.b    pchar,d0
  1114.     move.b    0(a0,d0.w),char
  1115.     move.l    pcx,cx
  1116.     move.l    pcy,cy
  1117.  
  1118.     bra    drwchar
  1119.  
  1120. *
  1121. * Adobe Type 1 .pfb w/ .afm putchar routine
  1122. *
  1123. putchafm:
  1124.     bsr    putwidth
  1125.     move.l    curfmetric,a0
  1126.     move.l    (a0),a0
  1127.     move.l    (a0),a0
  1128.     move.l    FM_FONT(a0),a0
  1129.     move.l    (a0),a0
  1130.     lea    PS_LOOKUP(a0),a0
  1131.     move.w    (a0)+,count
  1132.     bra    ptdmf4
  1133.  
  1134.  
  1135.  
  1136. putwidth:
  1137.     move.l    table,a1
  1138.     move.l    pblockw(a1),pwidth
  1139.     move.b    pblockptr(a1),pchar
  1140.     move.l    pblockx(a1),pcx
  1141.     move.l    pblocky(a1),pcy
  1142.     move.l    pattr,d0
  1143.     and.l    #%0011111001000000,d0
  1144.     beq    rrts
  1145.  
  1146.     move.l    pwidth,d0
  1147.     bsr    sendn
  1148.  
  1149.     move.l    pcx,d0
  1150.     move.l    pcy,d1
  1151.     cmp.l    curx,d0
  1152.     bne    putch1
  1153.     cmp.l    cury,d1
  1154.     bne    putch1
  1155. *
  1156. *
  1157.     lea    _puta1,a0
  1158.     bra    sendline
  1159. *
  1160. *
  1161. putch1:    move.l    pcx,d0
  1162.     move.l    pcy,d1
  1163.     bsr    sendxy
  1164.  
  1165.     move.l    pcx,curx
  1166.     move.l    pcy,cury
  1167.  
  1168.     lea    _puta2,a0
  1169.     bra    sendline
  1170.  
  1171. *
  1172. *
  1173. *
  1174.  
  1175. drwchar:
  1176.     move.b    #"(",d0
  1177.     bsr    send
  1178.     move.b    char,d0
  1179.     cmp.b    #127,d0
  1180.     bcc    dooct
  1181.     cmp.b    #32,d0
  1182.     bcs    dooct
  1183.     cmp.b    #"(",d0
  1184.     beq    drwc1
  1185.     cmp.b    #")",d0
  1186.     beq    drwc1
  1187.     cmp.b    #BACK,d0
  1188.     bne    drwc2
  1189. drwc1:    move.b    #BACK,d0
  1190.     bsr    send
  1191.     move.b    char,d0
  1192. drwc2:    bsr    send
  1193. drwc3:    move.b    #")",d0
  1194.     bsr    send
  1195.     move.b    #" ",d0
  1196.     bsr    send
  1197.  
  1198.     move.l    cx,d0
  1199.     move.l    cy,d1
  1200.     cmp.l    curx,d0
  1201.     bne    drwc4
  1202.     cmp.l    cury,d1
  1203.     bne    drwc4
  1204. *
  1205. *
  1206.     move.l    pwidth,d0
  1207.     bsr    sendn
  1208.  
  1209.     move.l    cx,d0
  1210.     move.l    cy,d1
  1211.     add.l    pwidth,d0
  1212.     move.l    d0,curx
  1213.     move.l    d1,cury
  1214.  
  1215.     lea    _putc1,a0
  1216.     bra    sendline
  1217. *
  1218. *
  1219. drwc4:    move.l    pwidth,d0
  1220.     bsr    sendn
  1221.  
  1222.     move.l    cx,d0
  1223.     move.l    cy,d1
  1224.     bsr    sendxy
  1225.  
  1226.     move.l    cx,d0
  1227.     move.l    cy,d1
  1228.     add.l    pwidth,d0
  1229.     move.l    d0,curx
  1230.     move.l    d1,cury
  1231.  
  1232.     lea    _putc2,a0
  1233.     bra    sendline
  1234.  
  1235.  
  1236. dooct:    move.b    d0,d1
  1237.     move.b    d0,d2
  1238.     lsr.b    #6,d0
  1239.     lsr.b    #3,d1
  1240.     and.b    #7,d0
  1241.     and.b    #7,d1
  1242.     and.b    #7,d2
  1243.     or.b    #"0",d0
  1244.     or.b    #"0",d1
  1245.     or.b    #"0",d2
  1246.     move.b    #BACK,array
  1247.     move.b    d0,array+1
  1248.     move.b    d1,array+2
  1249.     move.b    d2,array+3
  1250.     clr.b    array+4
  1251.     lea    array,a0
  1252.     bsr    sendline
  1253.     bra    drwc3
  1254.  
  1255.  
  1256. *******************************************************************
  1257. ***                                ***
  1258. *******************************************************************
  1259. * curftype -
  1260. * 1 bitmap
  1261. * 2 outline
  1262. * 3 psf
  1263. * 4 type 1 pgs internal
  1264. *
  1265.  
  1266. setfont:
  1267.     move.l    table,a0
  1268.     move.l    fmlist(a0),a1
  1269.     move.l    (a1),a1
  1270.     move.l    (a1),a1
  1271.     move.l    fmoff(a0),a0
  1272.     add.l    (a0),a1
  1273.     move.w    fm_Type(a1),curfmtype
  1274.  
  1275.     move.l    table,a0
  1276.     move.l    ftlist(a0),a1
  1277.     move.l    (a1),a1
  1278.     move.l    (a1),a1
  1279.     move.l    ftoff(a0),a0
  1280.     add.l    (a0),a1
  1281.     move.w    ft_XDpi(a1),curpsxdpi
  1282.     move.w    ft_YDpi(a1),curpsydpi
  1283.     move.w    ft_XPoint+2(a1),curpsxpoint
  1284.     move.w    ft_YPoint+2(a1),curpsypoint
  1285.  
  1286.     move.w    ft_Type(a1),d0
  1287.     move.w    d0,curftype
  1288.  
  1289.     cmp.w    #1,curfmtype
  1290.     bne    setfnt0
  1291.     cmp.w    #4,d0
  1292.     beq    setfnt0
  1293.     bra    setfnt0
  1294. *
  1295. * Type 3 with AFM
  1296. *
  1297.     rts
  1298.  
  1299.     move.l    curfont,a0        ;is the font available (disk errors?)
  1300.     tst.l    (a0)
  1301.     beq    rrts            ;no- return
  1302.     move.l    (a0),a0
  1303.     move.l    (a0),a0
  1304. *
  1305.     bsr    downloadit        ;does it need to be downloaded?
  1306.     beq    stps9            ;-no
  1307.  
  1308.     move.l    curfont,a0
  1309.     move.l    (a0),a0
  1310.     move.l    (a0),a0
  1311.  
  1312.     lea    PS_FNAME(a0),a0        ;it's out on disk under the name
  1313.     move.l    table,a1        ;in PS_FNAME, let's open it
  1314.     move.l    openfnt(a1),a1
  1315.     jsr    (a1)
  1316. stps1:    move.l    table,a1        ;read a chunk of the font
  1317.     move.l    readfnt(a1),a1
  1318.     jsr    (a1)
  1319.     tst.l    d0
  1320.     beq    stps9            ;-no more to read and send
  1321.     move.l    d0,d7
  1322.     bra    stps3
  1323. stps2:    move.b    (a0)+,d0        ;and start sending the chunk down
  1324.     beq    stpsf9
  1325.     move.l    d7,-(sp)
  1326.     move.l    a0,-(sp)
  1327.     bsr    send
  1328.     move.l    (sp)+,a0
  1329.     move.l    (sp)+,d7
  1330. stps3:    dbf    d7,stps2
  1331.     bra    stps1
  1332. *
  1333. stps9:    move.l    curfont,a0        ;the font is down there, let's
  1334.     move.l    (a0),a0            ;set it as our current font.
  1335.     move.l    (a0),a0
  1336.     lea    PS_NAME(a0),a0
  1337.     move.l    a0,-(sp)
  1338.     move.b    #"(",d0
  1339.     bsr    send
  1340.     move.l    (sp)+,a0
  1341.     bsr    sendline
  1342.     move.b    #")",d0
  1343.     bsr    send
  1344.     move.b    #" ",d0
  1345.     bsr    send
  1346. *
  1347. *
  1348.     move.l    attribute,a0            ;set the size
  1349.     move.l    xpoint(a0),d0
  1350.     move.l    ypoint(a0),d1
  1351.     bsr    send2n
  1352. *
  1353. *
  1354.     move.l    fontoff,a0
  1355.     move.l    (a0),d0
  1356.     move.l    fontlist,a0            ;set the attributes
  1357.     move.l    (a0),a0                ;to imitate
  1358.     move.l    (a0),a0
  1359.     add.l    d0,a0
  1360.     move.l    ft_Attrb(a0),d0
  1361.  
  1362.     eor.l    #$ffffffff,d0
  1363.     move.l    attribute,a0
  1364.     and.l    attr(a0),d0
  1365.     move.l    d0,pattr
  1366.     bsr    sendi
  1367. *
  1368. *
  1369.     lea    _setfp,a0            ;and set it
  1370.     bra    sendline
  1371. *
  1372. * end of setfont routines for Type3's with .AFM
  1373. *
  1374.  
  1375.  
  1376. setfnt0:
  1377.     cmp.w    #3,d0
  1378.     bne    setfnt1
  1379.  
  1380. *
  1381. * PageStream .PSF font
  1382. *
  1383.  
  1384.     move.l    curfont,a0        ;is the font available (disk errors?)
  1385.     tst.l    (a0)
  1386.     beq    rrts            ;no- return
  1387.     move.l    (a0),a0
  1388.     move.l    (a0),a0
  1389.  
  1390.     tst.b    PS_FNAME(a0)        ;is it a downloadable font?
  1391.     beq    stpsf9            ;-no
  1392. *
  1393.     bsr    downloadit        ;does it need to be downloaded?
  1394.     beq    stpsf9            ;-no
  1395.  
  1396.     move.l    curfont,a0
  1397.     move.l    (a0),a0
  1398.     move.l    (a0),a0
  1399.     cmp.w    #$0723,PS_FNAME(a0)    ;is the downloadable disk based
  1400.     beq    stpsf5            ;-no, merged into the .psf
  1401.  
  1402.     lea    PS_FNAME(a0),a0        ;-yes, it's out on disk under the name
  1403.     move.l    table,a1        ;in PS_FNAME, let's open it
  1404.     move.l    openfnt(a1),a1
  1405.     jsr    (a1)
  1406. stpsf1:    move.l    table,a1        ;read a chunk of the font
  1407.     move.l    readfnt(a1),a1
  1408.     jsr    (a1)
  1409.     tst.l    d0
  1410.     beq    stpsf9            ;-no more to read and send
  1411.     move.l    d0,d7
  1412.     bra    stpsf3
  1413. stpsf2:    move.b    (a0)+,d0        ;and start sending the chunk down
  1414.     beq    stpsf9
  1415.     move.l    d7,-(sp)
  1416.     move.l    a0,-(sp)
  1417.     bsr    send
  1418.     move.l    (sp)+,a0
  1419.     move.l    (sp)+,d7
  1420. stpsf3:    dbf    d7,stpsf2
  1421.     bra    stpsf1
  1422. *
  1423. stpsf5:    move.l    PS_FNAME+6(a0),d7    ;the .ps is merged into the .psf
  1424.     add.l    PS_FNAME+2(a0),a0
  1425. stpsf6:    move.b    (a0)+,d0        ;send it on down
  1426.     beq    stpsf9
  1427.     move.l    d7,-(sp)
  1428.     move.l    a0,-(sp)
  1429.     bsr    send
  1430.     move.l    (sp)+,a0
  1431.     move.l    (sp)+,d7
  1432.     subq.l    #1,d7
  1433.     bne    stpsf6
  1434. *
  1435. stpsf9:    move.l    curfont,a0        ;the font is down there, let's
  1436.     move.l    (a0),a0            ;set it as our current font.
  1437.     move.l    (a0),a0
  1438.     lea    PS_NAME(a0),a0
  1439.     move.l    a0,-(sp)
  1440.     move.b    #"(",d0
  1441.     bsr    send
  1442.     move.l    (sp)+,a0
  1443.     bsr    sendline
  1444.     move.b    #")",d0
  1445.     bsr    send
  1446.     move.b    #" ",d0
  1447.     bsr    send
  1448. *
  1449. *
  1450.     move.l    attribute,a0            ;set the size
  1451.     move.l    xpoint(a0),d0
  1452.     move.l    ypoint(a0),d1
  1453.     bsr    send2n
  1454. *
  1455. *
  1456.     move.l    fontoff,a0
  1457.     move.l    (a0),d0
  1458.     move.l    fontlist,a0            ;set the attributes
  1459.     move.l    (a0),a0                ;to imitate
  1460.     move.l    (a0),a0
  1461.     add.l    d0,a0
  1462.     move.l    ft_Attrb(a0),d0
  1463.  
  1464.     eor.l    #$ffffffff,d0
  1465.     move.l    attribute,a0
  1466.     and.l    attr(a0),d0
  1467.     move.l    d0,pattr
  1468.     bsr    sendi
  1469. *
  1470. *
  1471.     lea    _setfp,a0            ;and set it
  1472.     bra    sendline
  1473. *
  1474. * end of setfont routines for .psf's
  1475. *
  1476.  
  1477. *
  1478. *
  1479. *
  1480. setfnt1:
  1481.     cmp.w    #2,d0
  1482.     bne    setfnt2
  1483.  
  1484. *
  1485. * PageStream .DMF font
  1486. *
  1487.  
  1488.     move.l    curfont,a0        ;is the font available (disk errors?)
  1489.     tst.l    (a0)
  1490.     beq    rrts            ;no- return
  1491.     move.l    (a0),a0
  1492.     move.l    (a0),a0
  1493.  
  1494. *
  1495.     bsr    downloadit
  1496.     beq    stdmf10
  1497.  
  1498.     lea    dmfstr1,a0        ;header
  1499.     bsr    sendline
  1500.  
  1501.     move.w    #1,char
  1502. stdmf1:    bsr    dmfinuse
  1503.     beq    stdmf2
  1504.     lea    dmfstr2,a0        ;"Mx "
  1505.     bsr    sendline
  1506.     move.w    char,d0
  1507.     bsr    sendi
  1508.     move.l    curfmetric,a0
  1509.     move.l    (a0),a0
  1510.     move.l    (a0),a0
  1511.     lea    FM_CWIDTH(a0),a0
  1512.     move.w    char,d1
  1513.     lsl.w    #1,d1
  1514.     moveq    #0,d0
  1515.     move.w    0(a0,d1.w),d0
  1516.     divu    #10,d0
  1517.     bsr    sendi
  1518.     lea    dmfstr3,a0        ;"put",CR,LF
  1519.     bsr    sendline
  1520. stdmf2:    addq.b    #1,char+1
  1521.     bne    stdmf1
  1522.  
  1523.     move.w    #1,char
  1524. stdmf3:    bsr    dmfinuse
  1525.     beq    stdmf4
  1526.     lea    dmfstr4,a0        ; "Encoding "
  1527.     bsr    sendline
  1528.     move.w    char,d0
  1529.     bsr    sendi
  1530.     move.b    #"/",d0
  1531.     bsr    send
  1532.     move.w    char,d0
  1533.     bsr    sendi
  1534.     lea    dmfstr3,a0        ; "put",CR,LF
  1535.     bsr    sendline
  1536. stdmf4:    addq.b    #1,char+1
  1537.     bne    stdmf3
  1538.  
  1539.  
  1540.     move.w    #1,char
  1541. stdmf5:    bsr    dmfinuse
  1542.     beq    stdmf9
  1543.     lea    dmfstr5,a0        ; "CharacterDefs /"
  1544.     bsr    sendline
  1545.     move.w    char,d0
  1546.     bsr    sendi
  1547.     lea    dmfstr6,a0        ; CR,LF,"{ "
  1548.     bsr    sendline
  1549.  
  1550.     move.l    curfont,a0
  1551.     move.l    (a0),a0
  1552.     move.l    (a0),a0
  1553.     add.l    DM_BBOX(a0),a0
  1554.     move.w    char,d0
  1555.     lsl.w    #2,d0
  1556.     move.w    0(a0,d0.w),char_cx
  1557.     move.w    2(a0,d0.w),char_cy
  1558.  
  1559.     move.l    curfont,a0
  1560.     move.l    (a0),a0
  1561.     move.l    (a0),a0
  1562.     add.l    DM_CSET(a0),a0
  1563.  
  1564.     move.l    #512,d1
  1565.     move.w    char,d0
  1566.     lsl.w    #1,d0
  1567.     beq    stdmf6
  1568.     moveq    #0,d1
  1569.     move.w    -2(a0,d0.w),d1
  1570. stdmf6:    moveq    #0,d2
  1571.     move.w    0(a0,d0.w),d2
  1572.     move.l    a0,a1
  1573.     add.l    d1,a0
  1574.     add.l    d2,a1
  1575.     move.l    a1,endp
  1576.  
  1577. stdmf7:    cmp.l    endp,a0
  1578.     bcc    stdmf8
  1579.     move.w    (a0)+,d0
  1580.     lea    dmftbl,a1
  1581.     jsr    0(a1,d0.w)
  1582.     move.l    charpath,a0
  1583.     bra    stdmf7
  1584.  
  1585. stdmf8:    lea    dmfstr7,a0        ; "} put",CR,LF
  1586.     bsr    sendline
  1587. stdmf9:    addq.b    #1,char+1
  1588.     bne    stdmf5
  1589.  
  1590.     lea    dmfstr8,a0
  1591.     bsr    sendline
  1592.     bsr    dmfname
  1593.     lea    dmfstr9,a0
  1594.     bsr    sendline
  1595. *
  1596. stdmf10:
  1597.     move.b    #"(",d0
  1598.     bsr    send
  1599.     bsr    dmfname
  1600.     move.b    #")",d0
  1601.     bsr    send
  1602.     move.b    #" ",d0
  1603.     bsr    send
  1604. *
  1605. *
  1606.     move.l    attribute,a0            ;set the size
  1607.     move.l    xpoint(a0),d0
  1608.     move.l    ypoint(a0),d1
  1609.     bsr    send2n
  1610.  
  1611. *
  1612. *
  1613.     move.l    fontoff,a0
  1614.     move.l    (a0),d0
  1615.     move.l    fontlist,a0            ;set the attributes
  1616.     move.l    (a0),a0                ;to imitate
  1617.     move.l    (a0),a0
  1618.     add.l    d0,a0
  1619.     move.l    ft_Attrb(a0),d0
  1620.     eor.l    #$ffffffff,d0
  1621.     move.l    attribute,a0
  1622.     and.l    attr(a0),d0
  1623.     move.l    d0,pattr
  1624.     bsr    sendi
  1625. *
  1626. *
  1627.     lea    _setfp,a0            ;and set it
  1628.     bra    sendline
  1629.  
  1630.  
  1631. dmfinuse:
  1632.     move.l    curfont,a0
  1633.     move.l    (a0),a0
  1634.     move.l    (a0),a0
  1635.     add.l    DM_CSET(a0),a0
  1636.  
  1637.     move.w    #512,d1
  1638.     move.w    char,d0
  1639.     lsl.w    #1,d0
  1640.     beq    dmfiu1
  1641.     move.w    -2(a0,d0.w),d1
  1642. dmfiu1:    move.w    0(a0,d0.w),d2
  1643.     sub.w    d1,d2
  1644.     rts
  1645.  
  1646.  
  1647. dmfname:
  1648.     move.l    table,a1
  1649.     move.l    ftlist(a1),a0
  1650.     move.l    (a0),a0
  1651.     move.l    (a0),a0
  1652.     move.l    ftoff(a1),a1
  1653.     add.l    (a1),a0
  1654.     lea    fm_Name(a0),a0
  1655.  
  1656. dmfnm1:    move.b    (a0)+,d0
  1657.     beq    rrts
  1658.     cmp.b    #" ",d0
  1659.     beq    dmfnm1
  1660.     cmp.b    #".",d0
  1661.     beq    dmfnm1
  1662.     move.l    a0,-(sp)
  1663.     bsr    send
  1664.     move.l    (sp)+,a0
  1665.     bra    dmfnm1
  1666.  
  1667.  
  1668. dmftbl:
  1669.     bra.w    bnewp
  1670.     bra.w    bclosep
  1671.     bra.w    bfillp
  1672.     bra.w    bstrokep
  1673.     bra.w    bmoveto
  1674.     bra.w    blineto
  1675.     bra.w    bcurveto
  1676.     bra.w    barc
  1677.     bra.w    barcn
  1678.  
  1679. bnewp:    move.l    a0,charpath
  1680.     lea    dmfnp,a0
  1681.     bra    sendline
  1682.  
  1683. bclosep:
  1684.     move.l    a0,charpath
  1685.     lea    dmfcp,a0
  1686.     bra    sendline
  1687.  
  1688. bfillp:    move.l    a0,charpath
  1689.     lea    dmffp,a0
  1690.     bra    sendline
  1691.  
  1692. bstrokep:
  1693.     move.l    a0,charpath
  1694.     lea    dmfsp,a0
  1695.     bra    sendline
  1696.  
  1697. bmoveto:
  1698.     bsr    gsxy
  1699.     lea    dmfmt,a0
  1700.     bra    sendline
  1701.  
  1702. blineto:
  1703.     bsr    gsxy
  1704.     lea    dmflt,a0
  1705.     bra    sendline
  1706.  
  1707. bcurveto:
  1708.     bsr    gsxy
  1709.     move.l    charpath,a0
  1710.     bsr    gsxy
  1711.     move.l    charpath,a0
  1712.     bsr    gsxy
  1713.     lea    dmfct,a0
  1714.     bra    sendline
  1715.  
  1716. barc:    lea    12(a0),a0
  1717.     move.l    a0,charpath
  1718.     rts
  1719.  
  1720. barcn:    lea    12(a0),a0
  1721.     move.l    a0,charpath
  1722.     rts
  1723.  
  1724. gsxy:    move.w    (a0)+,d0
  1725.     move.w    (a0)+,d1
  1726.     move.l    a0,charpath
  1727.     sub.w    char_cx,d0
  1728.     sub.w    char_cy,d1
  1729.     neg.w    d1
  1730.     ext.l    d0
  1731.     ext.l    d1
  1732.     bsr    send2n
  1733.  
  1734.  
  1735. *
  1736. *
  1737. *
  1738. setfnt2:
  1739.     cmp.w    #4,d0
  1740.     bne    rrts
  1741.  
  1742. *
  1743. * Adobe .PFB font
  1744. *
  1745.     move.l    curfont,a0        ;is the font available (disk errors?)
  1746.     tst.l    (a0)
  1747.     beq    rrts            ;no- return
  1748.     move.l    (a0),a0
  1749.     move.l    (a0),a0
  1750.  
  1751.     bsr    downloadit
  1752.     beq    stpfb10
  1753. *
  1754.     move.l    table,a1            ;set the attributes
  1755.     move.l    ftlist(a1),a0            ;to imitate
  1756.     move.l    (a0),a0
  1757.     move.l    (a0),a0
  1758.     move.l    ftoff(a1),a1
  1759.     add.l    (a1),a0
  1760.  
  1761.     lea    ft_FName(a0),a0
  1762.     move.l    table,a1
  1763.     move.l    openfnt(a1),a1
  1764.     jsr    (a1)
  1765.     clr.l    plane
  1766.     clr.w    crlfcnt
  1767.  
  1768. stpfb1:    bsr    read            ;adobe chunk identifier
  1769.     beq    stpfb10
  1770.     cmp.b    #$80,d0
  1771.     bne    stpfb10
  1772.     bsr    read            ;type of chunk it is
  1773.     beq    stpfb10
  1774.     move.b    d0,array+4
  1775.  
  1776.     bsr    read            ;length (intel format :-(
  1777.     beq    stpfb10
  1778.     move.b    d0,array+3
  1779.     bsr    read
  1780.     beq    stpfb10
  1781.     move.b    d0,array+2
  1782.     bsr    read
  1783.     beq    stpfb10
  1784.     move.b    d0,array+1
  1785.     bsr    read
  1786.     beq    stpfb10
  1787.     move.b    d0,array
  1788.  
  1789.     cmp.b    #1,array+4
  1790.     beq    stpfb2
  1791.     cmp.b    #2,array+4
  1792.     beq    stpfb3
  1793.     bra    stpfb10
  1794.  
  1795. *
  1796. * send data as is
  1797. *
  1798. stpfb2:    bsr    read
  1799.     beq    stpfb10            ;premature end
  1800.     bsr    send
  1801.     subq.l    #1,array
  1802.     bhi    stpfb2
  1803.     clr.w    crlfcnt
  1804.     bra    stpfb1
  1805.  
  1806. *
  1807. * send data as hex equivalant
  1808. *
  1809. stpfb3:    bsr    read
  1810.     beq    stpfb10            ;premature end
  1811.     bsr    sendh
  1812.  
  1813.     addq.w    #2,crlfcnt
  1814.     cmp.w    #250,crlfcnt
  1815.     bcs    stpfb4
  1816.     clr.w    crlfcnt
  1817.     bsr    sendcrlf
  1818.  
  1819. stpfb4:    subq.l    #1,array
  1820.     bhi    stpfb3
  1821.     bra    stpfb1
  1822.  
  1823.  
  1824. *
  1825. stpfb10:
  1826.     move.b    #"(",d0
  1827.     bsr    send
  1828.  
  1829.     move.l    curfont,a0
  1830.     move.l    (a0),a0
  1831.     move.l    (a0),a0
  1832.     lea    PF_NAME(a0),a0
  1833.     bsr    sendline
  1834.  
  1835.     move.b    #")",d0
  1836.     bsr    send
  1837.     move.b    #" ",d0
  1838.     bsr    send
  1839.  
  1840.     move.l    attribute,a0            ;set the size
  1841.     move.l    xpoint(a0),d0
  1842.     move.l    ypoint(a0),d1
  1843.     bsr    send2n
  1844.  
  1845.     move.l    fontoff,a0
  1846.     move.l    (a0),d0
  1847.     move.l    fontlist,a0            ;set the attributes
  1848.     move.l    (a0),a0                ;to imitate
  1849.     move.l    (a0),a0
  1850.     add.l    d0,a0
  1851.     move.l    ft_Attrb(a0),d0
  1852.     eor.l    #$ffffffff,d0
  1853.     move.l    attribute,a0
  1854.     and.l    attr(a0),d0
  1855.     move.l    d0,pattr
  1856.     bsr    sendi
  1857.  
  1858.     lea    _setfp,a0            ;and set it
  1859.     bra    sendline
  1860.  
  1861. *
  1862. *
  1863. *
  1864. read:    subq.l    #1,plane
  1865.     bcs    getchunk
  1866.     move.l    pptr,a0
  1867.     move.b    (a0)+,d0
  1868.     move.l    a0,pptr
  1869.     moveq    #1,d1
  1870.     rts
  1871.  
  1872. getchunk:
  1873.     move.l    table,a1
  1874.     move.l    readfnt(a1),a1
  1875.     jsr    (a1)
  1876.     move.l    d0,plane
  1877.     beq    rrts
  1878.     move.l    a0,pptr
  1879.     bra    read
  1880.  
  1881. *
  1882. *
  1883. *
  1884. downloadit:
  1885.     move.l    table,a1        ;is it already been downloaded?
  1886.     move.l    ftlist(a1),a2
  1887.     move.l    (a2),a2
  1888.     move.l    (a2),a2
  1889.     move.l    ftoff(a1),a1
  1890.     add.l    (a1),a2
  1891.     tst.w    ft_Flag(a2)
  1892.     bne    rtndl            ;yes, it's already been downloaded
  1893.     move.w    #1,ft_Flag(a2)        ;no, let's downloaded, but first...
  1894. *
  1895.     btst    #0,auto_unload        ;if we are auto-unloading
  1896.     beq    rtdl            ; -no
  1897.     bsr    flushfont        ;then flush the last downloaded font
  1898.  
  1899.     lea    _bgnfnt,a0        ;and mark this one to be flushed
  1900.     bsr    sendline        ;next time through here
  1901.     move.l    table,a1
  1902.     move.l    ftoff(a1),a1
  1903.     move.l    (a1),downoff
  1904.     bset    #0,downflag
  1905. rtdl:    moveq    #1,d0
  1906.     rts
  1907. rtndl:    moveq    #0,d0
  1908.     rts
  1909.  
  1910. *******************************************************************
  1911. ***                                ***
  1912. *******************************************************************
  1913. puteps:
  1914.     move.l    table,a0
  1915.     cmp.w    #2,psepmode(a0)
  1916.     bne    peps1
  1917.     cmp.w    #$ffff,p_black
  1918.     bne    rrts
  1919.     move.w    p_cyan,d0
  1920.     or.w    p_magenta,d0
  1921.     or.w    p_yellow,d0
  1922.     bne    rrts
  1923.  
  1924. peps1:    move.l    table,a0
  1925.     move.l    pblockx(a0),d0
  1926.     move.l    pblocky(a0),d1
  1927.     bsr    send2n            ;width/height in 7200ths
  1928.     move.l    table,a0
  1929.     move.l    pblockptr(a0),a0
  1930.     move.l    (a0),a0
  1931.     move.l    eps_Width(a0),d0
  1932.     move.l    eps_Height(a0),d1
  1933.     bsr    send2n            ;original width in 7200ths
  1934.     move.l    table,a0
  1935.     move.l    pblockptr(a0),a0
  1936.     move.l    (a0),a0
  1937.     move.l    eps_Sizeof(a0),d0
  1938.     move.l    eps_Sizeof+4(a0),d1
  1939.     bsr    send2n            ;lower left
  1940.     move.l    table,a0
  1941.     move.l    pblockptr(a0),a0
  1942.     move.l    (a0),a0
  1943.     move.l    eps_Sizeof+8(a0),d0
  1944.     move.l    eps_Sizeof+12(a0),d1
  1945.     bsr    send2n            ;upper right
  1946.  
  1947.     lea    _bgneps,a0
  1948.     bsr    sendline
  1949.  
  1950.     move.l    table,a0
  1951.     cmp.w    #1,psepmode(a0)
  1952.     bne    mseps0
  1953. *
  1954. *
  1955.     lea    cyanplate,a2
  1956.     cmp.w    #$ffff,p_cyan
  1957.     beq    sepps1
  1958.  
  1959.     lea    magentaplate,a2
  1960.     cmp.w    #$ffff,p_magenta
  1961.     beq    sepps1
  1962.  
  1963.     lea    yellowplate,a2
  1964.     cmp.w    #$ffff,p_yellow
  1965.     beq    sepps1
  1966.  
  1967.     lea    blackplate,a2
  1968.     cmp.w    #$ffff,p_black
  1969.     bne    mseps0
  1970.  
  1971. sepps1:    bsr    fndeps
  1972.     beq    mseps0
  1973.  
  1974.     move.l    a1,-(sp)
  1975.  
  1976.     lea    includestr,a0
  1977.     bsr    sendline
  1978.     move.l    (sp)+,a1
  1979.  
  1980. sepps2:    move.b    (a1)+,d0
  1981.     beq    sepps2
  1982.     cmp.b    #CR,d0
  1983.     beq    sepps3
  1984.     cmp.b    #LF,d0
  1985.     beq    sepps3
  1986.     move.l    a1,-(sp)
  1987.     bsr    send
  1988.     move.l    (sp)+,a1
  1989.     bra    sepps2
  1990. sepps3:    move.b    #QUOTE,d0
  1991.     bsr    send
  1992.     bsr    sendcrlf
  1993.     bra    mseps9
  1994.  
  1995. *
  1996. *
  1997. mseps0:    move.l    table,a0
  1998.     move.l    pblockptr(a0),a0
  1999.     move.l    (a0),a0
  2000.     move.l    eps_DataLen(a0),d1
  2001.     sub.l    #16,d1
  2002.     bcs    mseps9
  2003.     lea    eps_Sizeof+16(a0),a0
  2004.     bra    mseps3
  2005. mseps1:    move.b    (a0)+,d0
  2006.  
  2007.     cmp.l    #4,d1
  2008.     bcc    mseps2
  2009.     cmp.b    #6,d0
  2010.     bcs    mseps3
  2011. mseps2:    movem.l    d1/a0,-(sp)
  2012.     bsr    send
  2013.     movem.l    (sp)+,d1/a0
  2014. mseps3:    subq.l    #1,d1
  2015.     bcc    mseps1
  2016.  
  2017.  
  2018. mseps9:    lea    _endeps,a0
  2019.     bra    sendline
  2020.  
  2021.  
  2022. *******************
  2023. ***        ***
  2024. *******************
  2025. fndeps:    move.l    pblockptr(a0),a0
  2026.     move.l    (a0),a0
  2027.     move.l    eps_DataLen(a0),d0
  2028.     sub.l    #16,d0
  2029.     bcs    fndps4
  2030.     lea    eps_Sizeof+16(a0),a0
  2031. fndps1:    move.l    a2,a3
  2032.     move.l    a0,a1
  2033. fndps2:    tst.b    (a3)
  2034.     beq    fndps4
  2035.     cmp.b    (a3)+,(a1)+
  2036.     beq    fndps2
  2037.     addq.l    #1,a0
  2038.     subq.l    #1,d0
  2039.     bhi    fndps1
  2040.     moveq    #0,d1
  2041.     rts
  2042.  
  2043. fndps4:    moveq    #1,d1
  2044.     rts
  2045.  
  2046. *******************************************************************
  2047. ***                                ***
  2048. *******************************************************************
  2049. getbpp:    bra.w    pal_bpp
  2050.     bra.w    bw_bpp
  2051.     bra.w    rgb_bpp
  2052.     bra.w    rgbw_bpp
  2053.     bra.w    cmy_bpp
  2054.     bra.w    cmyk_bpp
  2055.  
  2056.  
  2057. pal_bpp:
  2058.     moveq    #4,d0
  2059.     rts
  2060.  
  2061. rgbw_bpp:
  2062. cmyk_bpp:
  2063.     divu    #4,d0
  2064.     bra    bw_bpp
  2065.  
  2066. cmy_bpp:
  2067. rgb_bpp:
  2068.     divu    #3,d0
  2069. bw_bpp:    cmp.w    #2,d0
  2070.     bcs    rrts
  2071.     cmp.w    #4,d0
  2072.     bcc    bp2
  2073.     moveq    #4,d0
  2074.     rts
  2075. bp2:    moveq    #8,d0
  2076.     rts
  2077.  
  2078.  
  2079. putbmp:    move.l    table,a0
  2080.     move.l    pblockptr(a0),a1    ;handle to bit map header
  2081.     move.l    (a1),a1            ;ptr to bit map header
  2082.     move.w    pc_Type(a1),d1
  2083.     lsl.w    #2,d1
  2084.     move.w    pc_BitPln(a1),d0
  2085.     jsr    getbpp(pc,d1.w)
  2086.     move.w    d0,bpp
  2087.     clr.w    bcnt
  2088.     clr.w    bdata
  2089.  
  2090.     move.w    pc_Type(a1),d0
  2091.     cmp.w    #1,psepmode(a0)
  2092.     bne    bp4
  2093.     bset    #4,d0
  2094.     bra    bp7
  2095.  
  2096. bp4:    cmp.w    #2,psepmode(a0)
  2097.     bne    bp5
  2098.     bset    #3,d0
  2099.     bset    #4,d0
  2100.     bra    bp7
  2101.  
  2102. bp5:    tst.b    colorprt
  2103.     beq    bp7
  2104.     cmp.w    #PC_BW,d0
  2105.     beq    bp7
  2106.  
  2107.     bset    #3,d0
  2108.  
  2109. bp7:    move.w    d0,pmode
  2110.  
  2111.     move.w    pc_W(a1),d0        ;pixels wide
  2112.     move.w    pc_H(a1),d1        ;pixels high
  2113.     jsr    send2i
  2114.     move.w    bpp,d0            ;bits/pixel
  2115.     jsr    sendi
  2116.  
  2117.     move.l    table,a0
  2118.     move.l    pblockx(a0),d0
  2119.     move.l    pblocky(a0),d1
  2120.     bsr    send2n
  2121.  
  2122.     move.l    table,a0
  2123.     move.l    pblockptr(a0),a1
  2124.     move.l    (a1),a1
  2125.     move.w    pc_SFreq(a1),d0
  2126.     bsr    sendi
  2127.  
  2128.     move.l    table,a0
  2129.     move.l    pblockptr(a0),a1
  2130.     move.l    (a1),a1
  2131.     move.w    pc_SAngle(a1),d0
  2132.     bsr    sendi
  2133.  
  2134.     move.w    pmode,d0
  2135.     and.w    #%11000,d0
  2136.     cmp.w    #%01000,d0
  2137.     bne    bwpic
  2138.     lea    _putrgbpic,a0
  2139.     bra    dopic
  2140. bwpic:    lea    _putpic,a0
  2141. dopic:    bsr    sendline
  2142.  
  2143.     move.l    table,a0
  2144.     move.l    pblockptr(a0),a0    ;handle to bit map header
  2145.     move.l    (a0),a0            ;ptr to bit map header
  2146.  
  2147.     move.w    pc_W(a0),w
  2148.     move.w    pc_H(a0),h
  2149.     move.w    pc_Width(a0),pwidth
  2150.     move.w    pc_BitPln(a0),bitpln
  2151.     move.w    pwidth,d0
  2152.     mulu    h,d0
  2153.     move.l    d0,plane
  2154.     lea    pc_Sizeof(a0),a1
  2155.     move.l    a1,palptr
  2156.     add.l    pc_Ptr(a0),a0
  2157.  
  2158. *
  2159. * start of row
  2160. *
  2161. putp1:    move.l    a0,picptr
  2162.     moveq    #7,d7
  2163.     move.w    w,count
  2164.     clr.w    crlfcnt
  2165.  
  2166. putp2:    move.l    a0,pptr
  2167.     move.w    d7,pixel
  2168.  
  2169. *
  2170. *
  2171. *
  2172.     move.w    pmode,d0
  2173.     lsl.w    #2,d0
  2174.     jsr    pic_bw(pc,d0.w)
  2175.  
  2176. *
  2177. *
  2178. *
  2179.     move.l    pptr,a0
  2180.     move.w    pixel,d7
  2181.     dbf    d7,putp6
  2182.     moveq    #7,d7
  2183.     addq.l    #1,a0
  2184. putp6:    subq.w    #1,count
  2185.     bne    putp2
  2186.  
  2187.     bsr    lastpixel
  2188.  
  2189.     move.l    picptr,a0
  2190.     add.w    pwidth,a0
  2191.     subq.w    #1,h
  2192.     bne    putp1
  2193.  
  2194.     rts
  2195.  
  2196. *
  2197. *
  2198. *
  2199. pic_bw:
  2200.  
  2201. *
  2202. * bw output
  2203. *
  2204.     bra.w    pal_bw
  2205.     bra.w    bw_bw
  2206.     bra.w    rgb_bw
  2207.     bra.w    rgbw_bw
  2208.     bra.w    cmy_bw
  2209.     bra.w    cmyk_bw
  2210.     bra.w    rrts
  2211.     bra.w    rrts
  2212. *
  2213. * color output
  2214. *
  2215.     bra.w    pal_rgb
  2216.     bra.w    bw_rgb
  2217.     bra.w    rgb_rgb
  2218.     bra.w    rgbw_rgb
  2219.     bra.w    cmy_rgb
  2220.     bra.w    cmyk_rgb
  2221.     bra.w    rrts
  2222.     bra.w    rrts
  2223. *
  2224. * separation
  2225. *
  2226.     bra.w    pal_sep
  2227.     bra.w    bw_sep
  2228.     bra.w    rgb_sep
  2229.     bra.w    rgbw_sep
  2230.     bra.w    cmy_sep
  2231.     bra.w    cmyk_sep
  2232.     bra.w    rrts
  2233.     bra.w    rrts
  2234. *
  2235. * spot color
  2236. *
  2237.     bra.w    pal_mec
  2238.     bra.w    bw_mec
  2239.     bra.w    rgb_mec
  2240.     bra.w    rgbw_mec
  2241.     bra.w    cmy_mec
  2242.     bra.w    cmyk_mec
  2243.     bra.w    rrts
  2244.     bra.w    rrts
  2245.  
  2246.  
  2247.  
  2248.  
  2249. pal_bw:    moveq    #0,d0
  2250.     moveq    #0,d2
  2251.     move.w    bitpln,d1
  2252.     bra    pbw3
  2253. pbw1:    btst    d7,(a0)
  2254.     beq    pbw2
  2255.     bset    d2,d0
  2256. pbw2:    add.l    plane,a0
  2257.     addq.w    #1,d2
  2258. pbw3:    dbf    d1,pbw1
  2259.  
  2260. *
  2261. * color number in d0
  2262. *
  2263.  
  2264.     move.l    palptr,a0
  2265.     mulu    #pl_Sizeof,d0
  2266.     add.l    d0,a0
  2267.  
  2268.     move.w    pl_Red(a0),d0
  2269.     move.w    pl_Green(a0),d1
  2270.     move.w    pl_Blue(a0),d2
  2271.     mulu    #19661,d0        ;$4ccd
  2272.     mulu    #38666,d1        ;$970a
  2273.     mulu    #7209,d2        ;$1c29
  2274.     add.l    d1,d0
  2275.     add.l    d2,d0
  2276.     swap    d0
  2277.  
  2278.     bra    sendpixel
  2279.  
  2280.  
  2281. pal_rgb:
  2282.     moveq    #0,d0
  2283.     moveq    #0,d2
  2284.     move.w    bitpln,d1
  2285.     bra    prgb3
  2286. prgb1:    btst    d7,(a0)
  2287.     beq    prgb2
  2288.     bset    d2,d0
  2289. prgb2:    add.l    plane,a0
  2290.     addq.w    #1,d2
  2291. prgb3:    dbf    d1,prgb1
  2292.  
  2293. *
  2294. * color number in d0
  2295. *
  2296.  
  2297.     move.l    palptr,a0
  2298.     mulu    #pl_Sizeof,d0
  2299.     add.l    d0,a0
  2300.  
  2301.     move.w    pl_Red(a0),d0
  2302.     move.w    pl_Blue(a0),-(sp)
  2303.     move.w    pl_Green(a0),-(sp)
  2304.     bsr    sendpixel
  2305.     move.w    (sp)+,d0
  2306.     bsr    sendpixel
  2307.     move.w    (sp)+,d0
  2308.     bra    sendpixel
  2309.  
  2310. pal_sep:
  2311.     moveq    #0,d0
  2312.     moveq    #0,d2
  2313.     move.w    bitpln,d1
  2314.     bra    psep3
  2315. psep1:    btst    d7,(a0)
  2316.     beq    psep2
  2317.     bset    d2,d0
  2318. psep2:    add.l    plane,a0
  2319.     addq.w    #1,d2
  2320. psep3:    dbf    d1,psep1
  2321.  
  2322. *
  2323. * color number in d0
  2324. *
  2325.     move.l    palptr,a0
  2326.     mulu    #pl_Sizeof,d0
  2327.     add.l    d0,a0
  2328.     tst.w    pl_ScreenColor(a0)
  2329.     bmi    palwht
  2330.     move.w    pl_Red(a0),d0
  2331.     move.w    pl_Green(a0),d1
  2332.     move.w    pl_Blue(a0),d2
  2333.  
  2334.     neg.w    d0
  2335.     neg.w    d1
  2336.     neg.w    d2
  2337.     add.w    #65535,d0
  2338.     add.w    #65535,d1
  2339.     add.w    #65535,d2
  2340.     bsr    cmy_to_cmyk
  2341.     and.w    p_cyan,d0
  2342.     and.w    p_magenta,d1
  2343.     and.w    p_yellow,d2
  2344.     and.w    p_black,d3
  2345.     add.w    d0,d3
  2346.     add.w    d1,d3
  2347.     add.w    d2,d3
  2348.     move.w    #65535,d0
  2349.     sub.w    d3,d0
  2350.     bra    sendpixel
  2351.  
  2352. palwht:    move.w    #65535,d0
  2353.     bra    sendpixel
  2354.  
  2355.  
  2356. bw_bw:    moveq    #0,d0
  2357.     moveq    #0,d2
  2358.     moveq    #1,d3
  2359.     move.w    bitpln,d1
  2360.     bra    bbw3
  2361. bbw1:    btst    d7,(a0)
  2362.     beq    bbw2
  2363.     bset    d2,d0
  2364. bbw2:    add.l    plane,a0
  2365.     addq.w    #1,d2
  2366.     lsl.w    #1,d3
  2367. bbw3:    dbf    d1,bbw1
  2368.  
  2369.     subq.w    #1,d3
  2370.     mulu    #65535,d0
  2371.     divu    d3,d0
  2372.     neg.w    d0
  2373.     add.w    #65535,d0
  2374.     bra    sendpixel
  2375.  
  2376.  
  2377.  
  2378. bw_rgb:    moveq    #0,d0
  2379.     moveq    #0,d2
  2380.     moveq    #1,d3
  2381.     move.w    bitpln,d1
  2382.     bra    brgb3
  2383. brgb1:    btst    d7,(a0)
  2384.     beq    brgb2
  2385.     bset    d2,d0
  2386. brgb2:    add.l    plane,a0
  2387.     addq.w    #1,d2
  2388.     lsl.w    #1,d3
  2389. brgb3:    dbf    d1,brgb1
  2390.  
  2391.     subq.w    #1,d3
  2392.     mulu    #65535,d0
  2393.     divu    d3,d0
  2394.     move.w    d0,-(sp)
  2395.     bsr    sendpixel
  2396.     move.w    (sp),d0
  2397.     bsr    sendpixel
  2398.     move.w    (sp)+,d0
  2399.     bra    sendpixel
  2400.  
  2401. bw_sep:    moveq    #0,d0
  2402.     moveq    #0,d2
  2403.     moveq    #1,d3
  2404.     move.w    bitpln,d1
  2405.     bra    bsep3
  2406. bsep1:    btst    d7,(a0)
  2407.     beq    bsep2
  2408.     bset    d2,d0
  2409. bsep2:    add.l    plane,a0
  2410.     addq.w    #1,d2
  2411.     lsl.w    #1,d3
  2412. bsep3:    dbf    d1,bsep1
  2413.  
  2414.     subq.w    #1,d3
  2415.     mulu    #65535,d0
  2416.     divu    d3,d0
  2417. *
  2418. ;    move.w    d0,d1
  2419. ;    mulu    cyan,d1
  2420. ;    divu    #10000,d1
  2421. ;    and.w    p_cyan,d1
  2422. ;    move.w    d1,d2
  2423. ;
  2424. ;    move.w    d0,d1
  2425. ;    mulu    magenta,d1
  2426. ;    divu    #10000,d1
  2427. ;    and.w    p_magenta,d1
  2428. ;    add.w    d1,d2
  2429. ;
  2430. ;    move.w    d0,d1
  2431. ;    mulu    yellow,d1
  2432. ;    divu    #10000,d1
  2433. ;    and.w    p_yellow,d1
  2434. ;    add.w    d1,d2
  2435. ;
  2436. ;    move.w    d0,d1
  2437. ;    mulu    black,d1
  2438. ;    divu    #10000,d1
  2439. ;    and.w    p_black,d1
  2440. ;    add.w    d1,d2
  2441. ;
  2442. ;    move.w    #65535,d0
  2443. ;    sub.w    d2,d0
  2444.  
  2445.     and.w    p_black,d0
  2446.     neg.w    d0
  2447.     add.w    #65535,d0
  2448.  
  2449.     bra    sendpixel
  2450.  
  2451.  
  2452. rgb_bw:    moveq    #0,d0
  2453.     moveq    #0,d2
  2454.     moveq    #1,d3
  2455.     move.w    bitpln,d1
  2456.     bra    rbr3
  2457. rbr1:    btst    d7,(a0)
  2458.     beq    rbr2
  2459.     bset    d2,d0
  2460. rbr2:    add.l    plane,a0
  2461.     addq.w    #1,d2
  2462.     lsl.w    #1,d3
  2463. rbr3:    subq.w    #3,d1
  2464.     bcc    rbr1
  2465.     subq.w    #1,d3
  2466.     mulu    #65535,d0
  2467.     divu    d3,d0
  2468.     move.w    d0,-(sp)        ;blue
  2469.  
  2470.     moveq    #0,d0
  2471.     moveq    #0,d2
  2472.     move.w    bitpln,d1
  2473.     bra    rbg3
  2474. rbg1:    btst    d7,(a0)
  2475.     beq    rbg2
  2476.     bset    d2,d0
  2477. rbg2:    add.l    plane,a0
  2478.     addq.w    #1,d2
  2479. rbg3:    subq.w    #3,d1
  2480.     bcc    rbg1
  2481.     subq.w    #1,d3
  2482.     mulu    #65535,d0
  2483.     divu    d3,d0
  2484.     move.w    d0,-(sp)        ;green
  2485.  
  2486.     moveq    #0,d0
  2487.     moveq    #0,d2
  2488.     move.w    bitpln,d1
  2489.     bra    rbb3
  2490. rbb1:    btst    d7,(a0)
  2491.     beq    rbb2
  2492.     bset    d2,d0
  2493. rbb2:    add.l    plane,a0
  2494.     addq.w    #1,d2
  2495. rbb3:    subq.w    #3,d1
  2496.     bcc    rbb1
  2497.     subq.w    #1,d3
  2498.     mulu    #65535,d0
  2499.     divu    d3,d0            ;red
  2500.     move.w    (sp)+,d1
  2501.     move.w    (sp)+,d2
  2502.  
  2503.     mulu    #19661,d0
  2504.     mulu    #38666,d1
  2505.     mulu    #7209,d2
  2506.     add.l    d1,d0
  2507.     add.l    d2,d0
  2508.     swap    d0
  2509.  
  2510.     bra    sendpixel
  2511.  
  2512.  
  2513. rgb_rgb:
  2514.     moveq    #0,d0
  2515.     moveq    #0,d2
  2516.     moveq    #1,d3
  2517.     move.w    bitpln,d1
  2518.     bra    rrr3
  2519. rrr1:    btst    d7,(a0)
  2520.     beq    rrr2
  2521.     bset    d2,d0
  2522. rrr2:    add.l    plane,a0
  2523.     addq.w    #1,d2
  2524.     lsl.w    #1,d3
  2525. rrr3:    subq.w    #3,d1
  2526.     bcc    rrr1
  2527.     subq.w    #1,d3
  2528.     mulu    #65535,d0
  2529.     divu    d3,d0
  2530.     move.w    d0,-(sp)        ;blue
  2531.  
  2532.     moveq    #0,d0
  2533.     moveq    #0,d2
  2534.     move.w    bitpln,d1
  2535.     bra    rrg3
  2536. rrg1:    btst    d7,(a0)
  2537.     beq    rrg2
  2538.     bset    d2,d0
  2539. rrg2:    add.l    plane,a0
  2540.     addq.w    #1,d2
  2541. rrg3:    subq.w    #3,d1
  2542.     bcc    rrg1
  2543.     subq.w    #1,d3
  2544.     mulu    #65535,d0
  2545.     divu    d3,d0
  2546.     move.w    d0,-(sp)        ;green
  2547.  
  2548.     moveq    #0,d0
  2549.     moveq    #0,d2
  2550.     move.w    bitpln,d1
  2551.     bra    rrb3
  2552. rrb1:    btst    d7,(a0)
  2553.     beq    rrb2
  2554.     bset    d2,d0
  2555. rrb2:    add.l    plane,a0
  2556.     addq.w    #1,d2
  2557. rrb3:    subq.w    #3,d1
  2558.     bcc    rrb1
  2559.     subq.w    #1,d3
  2560.     mulu    #65535,d0
  2561.     divu    d3,d0            ;red
  2562.     bsr    sendpixel
  2563.     move.w    (sp)+,d0        ;green
  2564.     bsr    sendpixel
  2565.     move.w    (sp)+,d0        ;blue
  2566.     bra    sendpixel
  2567.  
  2568. rgb_sep:
  2569.     moveq    #0,d0
  2570.     moveq    #0,d2
  2571.     moveq    #1,d3
  2572.     move.w    bitpln,d1
  2573.     bra    rsr3
  2574. rsr1:    btst    d7,(a0)
  2575.     beq    rsr2
  2576.     bset    d2,d0
  2577. rsr2:    add.l    plane,a0
  2578.     addq.w    #1,d2
  2579.     lsl.w    #1,d3
  2580. rsr3:    subq.w    #3,d1
  2581.     bcc    rsr1
  2582.     subq.w    #1,d3
  2583.     mulu    #65535,d0
  2584.     divu    d3,d0
  2585.     move.w    d0,-(sp)        ;blue
  2586.  
  2587.     moveq    #0,d0
  2588.     moveq    #0,d2
  2589.     move.w    bitpln,d1
  2590.     bra    rsg3
  2591. rsg1:    btst    d7,(a0)
  2592.     beq    rsg2
  2593.     bset    d2,d0
  2594. rsg2:    add.l    plane,a0
  2595.     addq.w    #1,d2
  2596. rsg3:    subq.w    #3,d1
  2597.     bcc    rsg1
  2598.     subq.w    #1,d3
  2599.     mulu    #65535,d0
  2600.     divu    d3,d0
  2601.     move.w    d0,-(sp)        ;green
  2602.  
  2603.     moveq    #0,d0
  2604.     moveq    #0,d2
  2605.     move.w    bitpln,d1
  2606.     bra    rsb3
  2607. rsb1:    btst    d7,(a0)
  2608.     beq    rsb2
  2609.     bset    d2,d0
  2610. rsb2:    add.l    plane,a0
  2611.     addq.w    #1,d2
  2612. rsb3:    subq.w    #3,d1
  2613.     bcc    rsb1
  2614.     subq.w    #1,d3
  2615.     mulu    #65535,d0
  2616.     divu    d3,d0            ;red
  2617.  
  2618.     move.w    (sp)+,d1
  2619.     move.w    (sp)+,d2
  2620.  
  2621.     neg.w    d0
  2622.     neg.w    d1
  2623.     neg.w    d2
  2624.     add.w    #65535,d0
  2625.     add.w    #65535,d1
  2626.     add.w    #65535,d2
  2627.     bsr    cmy_to_cmyk
  2628.     and.w    p_cyan,d0
  2629.     and.w    p_magenta,d1
  2630.     and.w    p_yellow,d2
  2631.     and.w    p_black,d3
  2632.     add.w    d0,d3
  2633.     add.w    d1,d3
  2634.     add.w    d2,d3
  2635.     move.w    #65535,d0
  2636.     sub.w    d3,d0
  2637.     bra    sendpixel
  2638.  
  2639.  
  2640. rgbw_bw:
  2641. rgbw_rgb:
  2642. rgbw_sep:
  2643.  
  2644. cmy_bw:
  2645. cmy_rgb:
  2646. cmy_sep:
  2647.  
  2648. cmyk_bw:
  2649. cmyk_rgb:
  2650. cmyk_sep:
  2651.  
  2652. dowhite:
  2653.     move.w    #65535,d0
  2654.     bra    sendpixel
  2655.  
  2656.  
  2657. pal_mec:
  2658.     tst.w    p_cyan
  2659.     bne    dowhite
  2660.     tst.w    p_magenta
  2661.     bne    dowhite
  2662.     tst.w    p_yellow
  2663.     bne    dowhite
  2664.     cmp.w    #10000,p_black
  2665.     bcs    dowhite
  2666.     bra    pal_bw
  2667.  
  2668. bw_mec:
  2669.     tst.w    p_cyan
  2670.     bne    dowhite
  2671.     tst.w    p_magenta
  2672.     bne    dowhite
  2673.     tst.w    p_yellow
  2674.     bne    dowhite
  2675.     cmp.w    #10000,p_black
  2676.     bcs    dowhite
  2677.     bra    bw_bw
  2678.  
  2679. rgb_mec:
  2680.     tst.w    p_cyan
  2681.     bne    dowhite
  2682.     tst.w    p_magenta
  2683.     bne    dowhite
  2684.     tst.w    p_yellow
  2685.     bne    dowhite
  2686.     cmp.w    #10000,p_black
  2687.     bcs    dowhite
  2688.     bra    rgb_bw
  2689.  
  2690. rgbw_mec:
  2691.     tst.w    p_cyan
  2692.     bne    dowhite
  2693.     tst.w    p_magenta
  2694.     bne    dowhite
  2695.     tst.w    p_yellow
  2696.     bne    dowhite
  2697.     cmp.w    #10000,p_black
  2698.     bcs    dowhite
  2699.     bra    rgbw_bw
  2700.  
  2701. cmy_mec:
  2702.     tst.w    p_cyan
  2703.     bne    dowhite
  2704.     tst.w    p_magenta
  2705.     bne    dowhite
  2706.     tst.w    p_yellow
  2707.     bne    dowhite
  2708.     cmp.w    #10000,p_black
  2709.     bcs    dowhite
  2710.     bra    cmy_bw
  2711.  
  2712. cmyk_mec:
  2713.     tst.w    p_cyan
  2714.     bne    dowhite
  2715.     tst.w    p_magenta
  2716.     bne    dowhite
  2717.     tst.w    p_yellow
  2718.     bne    dowhite
  2719.     cmp.w    #10000,p_black
  2720.     bcs    dowhite
  2721.     bra    cmyk_bw
  2722.  
  2723.  
  2724. ***************************************************
  2725. ***                        ***
  2726. ***************************************************
  2727. cmy_to_cmyk:
  2728.     move.w    d0,d3
  2729.     cmp.w    d3,d1
  2730.     bcc    ctc1
  2731.     move.w    d1,d3
  2732. ctc1:    cmp.w    d3,d2
  2733.     bcc    ctc2
  2734.     move.w    d2,d3
  2735. ctc2:    cmp.w    #65535,d3
  2736.     beq    ctcblk
  2737.     move.w    d3,-(sp)
  2738.     mulu    #50,d3            ;ucr
  2739.     divu    #100,d3
  2740.     sub.w    d3,d0
  2741.     sub.w    d3,d1
  2742.     sub.w    d3,d2
  2743.     move.w    (sp)+,d3
  2744.  
  2745.     mulu    d3,d3            ;gcr
  2746.     divu    #65535,d3
  2747.     rts
  2748.  
  2749. ctcblk:    moveq    #0,d0
  2750.     moveq    #0,d1
  2751.     moveq    #0,d2
  2752.     move.w    #65535,d3
  2753.     rts
  2754. *
  2755. *
  2756. sendpixel:
  2757.     move.b    bdata,d2
  2758.     move.w    bpp,d1
  2759.     lsl.b    d1,d2
  2760.     and.l    #$ffff,d0
  2761.     lsl.l    d1,d0
  2762.     swap    d0
  2763.     or.b    d2,d0
  2764.     add.w    bcnt,d1
  2765.     cmp.w    #8,d1
  2766.     beq    sndpx1
  2767.     move.w    d1,bcnt
  2768.     move.b    d0,bdata
  2769.     rts
  2770. sndpx1:    clr.w    bcnt
  2771.     clr.w    bdata
  2772.     bsr    sendh
  2773.     addq.w    #2,crlfcnt
  2774.     cmp.w    #250,crlfcnt
  2775.     bcs    rrts
  2776.     clr.w    crlfcnt
  2777.     bra    sendcrlf
  2778.  
  2779. lastpixel:
  2780.     move.w    bcnt,d1
  2781.     beq    lstpx1
  2782.     move.b    bdata,d0
  2783.     neg.w    d1
  2784.     add.w    #8,d1
  2785.     lsl.b    d1,d0
  2786.     bsr    sendh
  2787.     clr.w    bcnt
  2788.     clr.w    bdata
  2789. lstpx1:    bra    sendcrlf
  2790.  
  2791.  
  2792.  
  2793. *******************************************************************
  2794. ***                                ***
  2795. *******************************************************************
  2796. flushfont:
  2797.     btst    #0,auto_unload
  2798.     beq    rrts
  2799.     bclr    #0,downflag
  2800.     beq    rrts
  2801.     move.l    table,a1
  2802.     move.l    ftlist(a1),a2
  2803.     move.l    (a2),a2
  2804.     move.l    (a2),a2
  2805.     add.l    downoff,a2
  2806.     clr.w    ft_Flag(a2)
  2807.     move.l    #$7fffffff,curx
  2808.     move.l    #$7fffffff,cury
  2809.     lea    _endfnt,a0
  2810.     bra    sendline
  2811.  
  2812.  
  2813. *******************************************************************
  2814. ***                                ***
  2815. *******************************************************************
  2816.  
  2817.  
  2818. Divs1648:
  2819.     move.l    table,a0
  2820.     move.l    divs1648(a0),a0
  2821.     jmp    (a0)
  2822.  
  2823. Muls1632:
  2824.     move.l    table,a0
  2825.     move.l    muls1632(a0),a0
  2826.     jmp    (a0)
  2827.  
  2828. *
  2829. * these are the send routines for the
  2830. * page description driver.
  2831. *
  2832. sendcrlf:
  2833.     move.b    #CR,d0
  2834.     bsr    send
  2835.     move.b    #LF,d0
  2836.     bra    send
  2837. *
  2838. sendh:    move.w    d0,-(sp)
  2839.     lsr.b    #4,d0
  2840.     bsr    rc1
  2841.     move.w    (sp)+,d0
  2842. rc1:    and.w    #$f,d0
  2843.     lea    hex,a0
  2844.     move.b    0(a0,d0.w),d0
  2845.     bra    send
  2846. *
  2847. *
  2848. sendline:
  2849.     move.b    (a0)+,d0
  2850.     beq    rrts
  2851.     move.l    a0,-(sp)
  2852.     bsr    send
  2853.     move.l    (sp)+,a0
  2854.     bra    sendline
  2855. *
  2856. *
  2857. send2n:    move.l    d1,-(sp)
  2858.     bsr    sendn
  2859.     move.l    (sp)+,d0
  2860.     bra    sendn
  2861.  
  2862. *
  2863. send2i:    move.w    d1,-(sp)
  2864.     bsr    sendi
  2865.     move.w    (sp)+,d0
  2866.     bra    sendi
  2867. *
  2868. sendxy:    move.l    d1,-(sp)
  2869.     bsr    sendn
  2870.     move.l    yinvert,d0
  2871.     sub.l    (sp)+,d0
  2872.     bra    sendn
  2873. *
  2874. * fall into sendn
  2875. *
  2876. sendi:    and.l    #$ffff,d0
  2877. sendn:    tst.l    d0
  2878.     bpl    snd0
  2879.  
  2880.     move.l    d0,-(sp)
  2881.     move.b    #"-",d0
  2882.     bsr    send
  2883.     move.l    (sp)+,d0
  2884.     neg.l    d0
  2885.  
  2886. snd0:    move.l    d0,d1
  2887.     moveq    #0,d0
  2888.     move.l    #10000000,d2
  2889.     bsr    snd1
  2890.     move.l    #1000000,d2
  2891.     bsr    snd1
  2892.     move.l    #100000,d2
  2893.     bsr    snd1
  2894.     move.l    #10000,d2
  2895.     bsr    snd1
  2896.     move.l    #1000,d2
  2897.     bsr    snd1
  2898.     move.l    #100,d2
  2899.     bsr    snd1
  2900.     move.l    #10,d2
  2901.     bsr    snd1
  2902.     or.b    #"0",d1
  2903.     move.b    d1,d0
  2904.     bsr    send
  2905.     move.b    #$20,d0
  2906.     bra    send        ;send a space
  2907.  
  2908.  
  2909. snd1:    cmp.l    d2,d1
  2910.     bcs    snd2
  2911.     sub.l    d2,d1
  2912.     addq.w    #1,d0
  2913.     bra    snd1
  2914. snd2:    tst.w    d0
  2915.     beq    snd3
  2916.     move.l    d1,-(sp)
  2917.     or.b    #"0",d0
  2918.     bsr    send
  2919.     move.l    (sp)+,d1
  2920.     move.b    #"0",d0
  2921. snd3:    rts
  2922.  
  2923. *
  2924. *
  2925.  
  2926. send:    jmp    $ffffff
  2927.  
  2928. *
  2929. *
  2930. *******************************************************************
  2931. ***                                ***
  2932. *******************************************************************
  2933.  
  2934.  SECTION printer,DATA,PUBLIC
  2935.  
  2936.  
  2937. prntbl:    dc.l    prtok,prtok,prtok,prtok,p_init
  2938.     dc.l    p_bgndoc,p_bgnpage,p_bgntile
  2939.     dc.l    prtok
  2940.     dc.l    p_endtile,p_endpage,p_enddoc
  2941.     dc.l    p_break,p_ident
  2942. *
  2943.     dc.l    setfill        ;10
  2944.     dc.l    setline        ;11
  2945.     dc.l    newpath        ;12
  2946.      dc.l    closepath    ;13
  2947.     dc.l    fillpath    ;14
  2948.     dc.l    strokepath    ;15
  2949.     dc.l    moveto        ;16
  2950.     dc.l    lineto        ;17
  2951.     dc.l    curveto        ;18
  2952.     dc.l    arcto        ;19
  2953.     dc.l    arcnto        ;20
  2954.     dc.l    prtok
  2955.     dc.l    prtok
  2956.     dc.l    setcolor    ;23
  2957.     dc.l    rotate        ;24
  2958.     dc.l    setfont        ;25
  2959.     dc.l    prtok
  2960.     dc.l    prtok
  2961.     dc.l    prtok
  2962.     dc.l    prtok
  2963.     dc.l    putchar        ;30
  2964.     dc.l    putbmp        ;31
  2965.     dc.l    puteps        ;32
  2966.  
  2967.  
  2968. *
  2969. *
  2970. *
  2971. lwdash:    dc.l    lwd1,lwd1,lwd2,lwd3,lwd4,lwd5,lwd6,lwd7
  2972. lwd1:    dc.b    "[]",0
  2973. lwd2:    dc.b    "[600 200]",0
  2974. lwd3:    dc.b    "[100 300]",0
  2975. lwd4:    dc.b    "[400 150 100 150]",0
  2976. lwd5:    dc.b    "[400 400]",0
  2977. lwd6:    dc.b    "[200 150 100 100 50 150]",0
  2978. lwd7:    dc.b    "[",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  2979.     dc.b    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  2980.  
  2981.  
  2982. ******
  2983. ******
  2984. *
  2985. *
  2986. f_tbl:    dc.b    0,$80+1,12,25,37,50,62,75,87,100
  2987.     dc.b    $80+10,$80+11,$80+12,$80+13,$80+14
  2988.     dc.b    $80+15,$80+16,$80+17,$80+18,$80+19
  2989.     dc.b    $80+20,$80+21,$80+22,$80+23,$80+24
  2990.     dc.b    $80+25,$80+26,$80+27,$80+28,$80+29
  2991.     dc.b    $80+30,$80+31,$80+32,$80+33,$80+34
  2992.     dc.b    $80+35,$80+36,$80+37,$80+38,$80+39
  2993.  
  2994.  
  2995. _bgnpage:    dc.b    "% Begin Page",CR,LF,0
  2996. _endpage:    dc.b    "% End Page",CR,LF,CR,LF,0
  2997. _bgntile:    dc.b    "% Begin Tile",CR,LF,0
  2998. _bgntile2:    dc.b    "begintile",CR,LF,0
  2999. _endtile:    dc.b    "endtile",CR,LF
  3000.         dc.b    "showpage",CR,LF
  3001.         dc.b    "% End Tile",CR,LF,0
  3002.  
  3003. _setscl:    dc.b    "setscl",CR,LF,0
  3004. _newpath:    dc.b    "NW",CR,LF,0
  3005. _moveto:    dc.b    "MT",CR,LF,0
  3006. _lineto:    dc.b    "LT",CR,LF,0
  3007. _curveto:    dc.b    "CRV",CR,LF,0
  3008. _arcto:        dc.b    "AT",CR,LF,0
  3009. _arcnto:    dc.b    "AN",CR,LF,0
  3010. _closepath:    dc.b    "CP",CR,LF,0
  3011. _setshade:    dc.b    "SHADE",CR,LF,0
  3012. _setcmyk:    dc.b    "CMYK",CR,LF,0
  3013. _setpattern:    dc.b    "PTRN",CR,LF,0
  3014. _setline:    dc.b    " LTYPE",CR,LF,0
  3015. _fillpath:    dc.b    "MF",CR,LF,0
  3016. _strokepath:    dc.b    "MS",CR,LF,0
  3017. _bgnfnt:    dc.b    "/PgsFontSave save def",CR,LF,0
  3018. _endfnt:    dc.b    "PgsFontSave restore omatrix setmatrix",CR,LF,0
  3019. _bgnpgu:    dc.b    "/PgsPageSave save def",CR,LF,0
  3020. _endpgu:    dc.b    "PgsPageSave restore",CR,LF,0
  3021.  
  3022. _dobgnmoveto:    dc.b    "BS",CR,LF,0
  3023. _doendstroke:    dc.b    "ES",CR,LF,0
  3024.  
  3025. _putc1:        dc.b    "r",CR,LF,0
  3026. _putc2:        dc.b    "p",CR,LF,0
  3027. _puta1:        dc.b    "a ",0
  3028. _puta2:        dc.b    "b ",0
  3029. _setfp:        dc.b    "setfp",CR,LF,0
  3030. _putpic:    dc.b    "putpic",CR,LF,0
  3031. _putrgbpic:    dc.b    "putrgbpic",CR,LF,0
  3032. _bgneps:    dc.b    "bgneps",CR,LF,0
  3033. _endeps:    dc.b    "endeps",CR,LF,0
  3034.  
  3035. _enddoc:
  3036.  dc.b "%%Trailer",CR,LF
  3037.  dc.b "end",CR,LF
  3038.  dc.b "%%EOF",CR,LF
  3039.  dc.b 4,0
  3040.  
  3041. _comments:
  3042.  dc.b "%!PS-Adobe-2.0",CR,LF
  3043.  dc.b "%%Title: Unknown",CR,LF
  3044.  dc.b "%%Creator: PageStream v2.0",CR,LF
  3045.  dc.b "%%CreationDate: Not Available",CR,LF
  3046.  dc.b "%%For: Who Created This Document",CR,LF
  3047.  dc.b "%%Routing: How To Route Document Back",CR,LF
  3048.  dc.b "%%ProofMode: Substitute",CR,LF
  3049.  dc.b 0
  3050.  
  3051. _bbcomment: dc.b "%%BoundingBox:",0
  3052. _npcomment: dc.b "%%Pages: Unknown",CR,LF,0
  3053. _dfcomment: dc.b "%%DocumentFonts:",CR,LF,0
  3054. _dnfcomment: dc.b "%%DocumentNeededFonts:",CR,LF,0
  3055. _dsfcomment: dc.b "%%DocumentSuppliedFonts:",CR,LF,0
  3056.  
  3057. _prolog:
  3058.  dc.b "%%EndComments",CR,LF
  3059.  dc.b CR,LF
  3060.  dc.b "%%BeginProlog",CR,LF
  3061.  dc.b "/AsphaltDict dup 150 dict def load begin",CR,LF
  3062.  dc.b CR,LF
  3063.  dc.b "%",CR,LF
  3064.  dc.b "% some redefinitions",CR,LF
  3065.  dc.b "%",CR,LF
  3066.  dc.b "/bdef {bind def} bind def",CR,LF
  3067.  dc.b "/xdef {exch def} bind def",CR,LF
  3068.  dc.b "/dmatrix matrix def",CR,LF
  3069.  dc.b "/cmatrix matrix def",CR,LF
  3070.  dc.b "/omatrix matrix def",CR,LF
  3071.  dc.b CR,LF
  3072.  dc.b "%",CR,LF
  3073.  dc.b "% drawing definitions",CR,LF
  3074.  dc.b "%",CR,LF
  3075.  dc.b CR,LF
  3076.  dc.b "/sclm [0 0 0 0 0 0] def",CR,LF
  3077.  dc.b "/setscl {",CR,LF
  3078.  dc.b "  /deltay exch neg def",CR,LF
  3079.  dc.b "  /deltax exch neg def",CR,LF
  3080.  dc.b "  100 div /twist xdef",CR,LF
  3081.  dc.b "  100 div /slant xdef",CR,LF
  3082.  dc.b "  cmatrix setmatrix deltax neg deltay neg translate",CR,LF
  3083.  dc.b "  sclm 0 twist cos put",CR,LF
  3084.  dc.b "  sclm 1 twist sin put",CR,LF
  3085.  dc.b "  sclm 2 slant sin neg put",CR,LF
  3086.  dc.b "  sclm 3 slant cos put",CR,LF
  3087.  dc.b "  sclm concat",CR,LF
  3088.  dc.b "  /omatrix omatrix currentmatrix def",CR,LF
  3089.  dc.b "} bdef",CR,LF
  3090.  dc.b CR,LF
  3091.  dc.b "/scl {",CR,LF
  3092.  dc.b " deltay add exch",CR,LF
  3093.  dc.b " deltax add exch",CR,LF
  3094.  dc.b "} bdef",CR,LF
  3095.  dc.b CR,LF
  3096.  dc.b "/NW {newpath} bdef",CR,LF
  3097.  dc.b "/MT {scl moveto} bdef",CR,LF
  3098.  dc.b "/LT {scl lineto} bdef",CR,LF
  3099.  dc.b "/CRV {scl 6 2 roll scl 6 2 roll scl 6 2 roll curveto} bdef",CR,LF
  3100.  dc.b CR,LF
  3101.  dc.b "/AT {",CR,LF
  3102.  dc.b "  100 div /eang xdef 100 div /bang xdef",CR,LF
  3103.  dc.b "  /yscl xdef /xscl xdef scl translate",CR,LF
  3104.  dc.b "  xscl yscl scale 0 0 1 bang eang",CR,LF
  3105.  dc.b "  arc omatrix setmatrix",CR,LF
  3106.  dc.b "} bdef",CR,LF
  3107.  dc.b CR,LF
  3108.  dc.b "/AN {",CR,LF
  3109.  dc.b "  100 div /eang xdef 100 div /bang xdef",CR,LF
  3110.  dc.b "  /yscl xdef /xscl xdef scl translate",CR,LF
  3111.  dc.b "  xscl yscl scale 0 0 1 bang eang",CR,LF
  3112.  dc.b "  arcn omatrix setmatrix",CR,LF
  3113.  dc.b "} bdef",CR,LF
  3114.  dc.b CR,LF
  3115.  dc.b "/CP {closepath} bdef",CR,LF
  3116.  dc.b CR,LF
  3117.  dc.b "/LTYPE {0 setdash setlinewidth} bdef",CR,LF
  3118.  dc.b "/MF {gsave eofill grestore} bdef",CR,LF
  3119.  dc.b "/MS {gsave stroke grestore} bdef",CR,LF
  3120.  dc.b CR,LF
  3121.  dc.b "%",CR,LF
  3122.  dc.b "%",CR,LF
  3123.  dc.b "%",CR,LF
  3124.  dc.b "/cropmark {",CR,LF
  3125.  dc.b "  /ydir xdef",CR,LF
  3126.  dc.b "  /xdir xdef",CR,LF
  3127.  dc.b "  /cbv xdef",CR,LF
  3128.  dc.b "  /cbh xdef",CR,LF
  3129.  dc.b "  moveto",CR,LF
  3130.  dc.b "  cbh 6 add xdir mul 0 rmoveto",CR,LF
  3131.  dc.b "  20 xdir mul 0 rlineto",CR,LF
  3132.  dc.b "  cbh 26 add neg xdir mul cbv 6 add ydir mul rmoveto",CR,LF
  3133.  dc.b "  0 20 ydir mul rlineto stroke",CR,LF
  3134.  dc.b "} def",CR,LF
  3135.  dc.b CR,LF
  3136.  dc.b "/regmark {",CR,LF
  3137.  dc.b "  10 0 360 arc",CR,LF
  3138.  dc.b "  4 0 rmoveto",CR,LF
  3139.  dc.b "  -28 0 rlineto",CR,LF
  3140.  dc.b "  14 14 rmoveto",CR,LF
  3141.  dc.b "  0 -28 rlineto stroke",CR,LF
  3142.  dc.b "} def",CR,LF
  3143.  dc.b CR,LF
  3144.  dc.b CR,LF
  3145.  dc.b "%",CR,LF
  3146.  dc.b "% tilestring sepmode cyan magenta yellow black",CR,LF
  3147.  dc.b "% negative mirror cropmarks manualfeed landscape xscale yscale",CR,LF
  3148.  dc.b "% leftclip topclip documentwidth documentheight tilex tiley tilew tileh",CR,LF
  3149.  dc.b "% bleedh bleedv frequency angle copies BEGINTILE",CR,LF
  3150.  dc.b "%",CR,LF
  3151.  dc.b "/begintile {",CR,LF
  3152.  dc.b "  /#copies xdef",CR,LF
  3153.  dc.b "  /cangle xdef",CR,LF
  3154.  dc.b "  /cfreq xdef",CR,LF
  3155.  dc.b "  /bleedv xdef",CR,LF
  3156.  dc.b "  /bleedh xdef",CR,LF
  3157.  dc.b "  /tileh xdef",CR,LF
  3158.  dc.b "  /tilew xdef",CR,LF
  3159.  dc.b "  /tiley xdef",CR,LF
  3160.  dc.b "  /tilex xdef",CR,LF
  3161.  dc.b "  /doch xdef",CR,LF
  3162.  dc.b "  /docw xdef",CR,LF
  3163.  dc.b "  /leftclip xdef",CR,LF
  3164.  dc.b "  /topclip xdef",CR,LF
  3165.  dc.b "  /docyscl xdef",CR,LF
  3166.  dc.b "  /docxscl xdef",CR,LF
  3167.  dc.b "  /landscape xdef",CR,LF
  3168.  dc.b "  /manual xdef",CR,LF
  3169.  dc.b "  /cropmarks xdef",CR,LF
  3170.  dc.b "  /mirror xdef",CR,LF
  3171.  dc.b "  /negative xdef",CR,LF
  3172.  dc.b "  /pblack xdef",CR,LF
  3173.  dc.b "  /pyellow xdef",CR,LF
  3174.  dc.b "  /pmagenta xdef",CR,LF
  3175.  dc.b "  /pcyan xdef",CR,LF
  3176.  dc.b "  /psepmode xdef",CR,LF
  3177.  dc.b "  /tilename xdef",CR,LF
  3178.  dc.b CR,LF
  3179.  dc.b "  /dmatrix dmatrix currentmatrix def",CR,LF
  3180.  dc.b CR,LF
  3181.  dc.b "  statusdict /setpageparams known",CR,LF
  3182.  dc.b "   {",CR,LF
  3183.  dc.b "    mirror 1 eq {statusdict /mirrorprint known {statusdict /mirrorprint true put /mirror 0 def}if }if",CR,LF
  3184.  dc.b "    negative 1 eq {statusdict /negativeprint known {statusdict /negativeprint true put /negative 0 def}if }if",CR,LF
  3185.  dc.b "    statusdict begin tileh tilew cropmarks 1 eq {72 add exch 72 add exch}if 0 0 setpageparams end",CR,LF
  3186.  dc.b "    leftclip topclip translate",CR,LF
  3187.  dc.b "   } if",CR,LF
  3188.  dc.b "  leftclip topclip translate",CR,LF
  3189.  dc.b "  mirror 1 eq {docw 0 translate -1 1 scale} if",CR,LF
  3190.  dc.b "  negative 1 eq {{1 exch sub} settransfer newpath clippath 1 setgray fill} if",CR,LF
  3191.  dc.b "  manual 1 eq {statusdict /manualfeed known {statusdict /manualfeed true put}if }if",CR,LF
  3192.  dc.b "  tilex neg tiley neg translate",CR,LF
  3193.  dc.b CR,LF
  3194.  dc.b "  cropmarks 1 eq {",CR,LF
  3195.  dc.b "    bleedh 0 ge {/bh bleedh def /bv bleedv def}{/bh 0 def /bv 0 def}ifelse",CR,LF
  3196.  dc.b "    mirror 0 eq {bh 36 add bv 36 add translate}{bh 36 add neg bv 36 add translate}ifelse",CR,LF
  3197.  dc.b "    gsave",CR,LF
  3198.  dc.b "    0 setgray [] 0 setdash .3 setlinewidth",CR,LF
  3199.  dc.b "    tilex tiley bh bv -1 -1 cropmark",CR,LF
  3200.  dc.b "    tilex tilew add tiley bh bv 1 -1 cropmark",CR,LF
  3201.  dc.b "    tilex tilew add tiley tileh add bh bv 1 1 cropmark",CR,LF
  3202.  dc.b "    tilex tiley tileh add bh bv -1 1 cropmark",CR,LF
  3203.  dc.b "    tilew 2 div tilex add 18 tiley add tileh add bv add regmark",CR,LF
  3204.  dc.b "    tilew 2 div tilex add -18 tiley add bv sub regmark",CR,LF
  3205.  dc.b "    /Courier findfont 8 scalefont setfont",CR,LF
  3206.  dc.b "    tilex 14 sub bh sub 18 tiley add moveto",CR,LF
  3207.  dc.b "    90 rotate tilename show grestore",CR,LF
  3208.  dc.b "  } if",CR,LF
  3209.  dc.b CR,LF
  3210.  dc.b "  bleedh 0 ge {",CR,LF
  3211.  dc.b "    tilex bleedh sub tiley bleedv sub moveto",CR,LF
  3212.  dc.b "    tilex tilew add bleedh add tiley bleedv sub lineto",CR,LF
  3213.  dc.b "    tilex tilew add bleedh add tiley tileh add bleedv add lineto",CR,LF
  3214.  dc.b "    tilex bleedh sub tiley tileh add bleedv add lineto",CR,LF
  3215.  dc.b "    clip",CR,LF
  3216.  dc.b "  } if",CR,LF
  3217.  dc.b CR,LF
  3218.  dc.b "  landscape 1 eq {-90 rotate doch neg 0 translate} if",CR,LF
  3219.  dc.b "  docxscl 10000.0 div docyscl 10000.0 div scale",CR,LF
  3220.  dc.b CR,LF
  3221.  dc.b "  currentscreen /dproc xdef /dangle xdef /dfreq xdef",CR,LF
  3222.  dc.b "  /dtrans currenttransfer def",CR,LF
  3223.  dc.b CR,LF
  3224.  dc.b "  cangle 10000 gt {/cangle dangle def} if",CR,LF
  3225.  dc.b "  cfreq 10000 gt {/cfreq dfreq def} if",CR,LF
  3226.  dc.b "  cfreq cangle /dproc load setscreen",CR,LF
  3227.  dc.b "  /cmatrix cmatrix currentmatrix def",CR,LF
  3228.  dc.b CR,LF
  3229.  dc.b " psepmode 0 eq {systemdict /setcmykcolor known not",CR,LF
  3230.  dc.b "   {/setcmykcolor",CR,LF
  3231.  dc.b "    {1 sub 4 1 roll 3 {3 index add neg dup 0 lt{pop 0}if 3 1 roll}",CR,LF
  3232.  dc.b "     repeat setrgbcolor pop} bdef}",CR,LF
  3233.  dc.b "  if} if",CR,LF
  3234.  dc.b " psepmode 1 eq {",CR,LF
  3235.  dc.b "  pcyan 0 ne {/setcmykcolor {pop pop pop 1 exch sub setgray}bdef} if",CR,LF
  3236.  dc.b "  pmagenta 0 ne {/setcmykcolor {pop pop 1 exch sub setgray pop}bdef} if",CR,LF
  3237.  dc.b "  pyellow 0 ne {/setcmykcolor {pop 1 exch sub setgray pop pop}bdef} if",CR,LF
  3238.  dc.b "  pblack 0 ne {/setcmykcolor {1 exch sub setgray pop pop pop}bdef} if",CR,LF
  3239.  dc.b " } if",CR,LF
  3240.  dc.b " psepmode 2 eq {/setcmykcolor {",CR,LF
  3241.  dc.b "  pblack 10000 div eq exch",CR,LF
  3242.  dc.b "  pyellow 10000 div eq and exch",CR,LF
  3243.  dc.b "  pmagenta 10000 div eq and exch",CR,LF
  3244.  dc.b "  pcyan 10000 div eq and {0 setgray}{1 setgray}ifelse}bdef} if",CR,LF
  3245.  dc.b CR,LF
  3246.  dc.b "} bdef",CR,LF
  3247.  dc.b CR,LF
  3248.  dc.b "%",CR,LF
  3249.  dc.b "%",CR,LF
  3250.  dc.b "%",CR,LF
  3251.  dc.b "/endtile {",CR,LF
  3252.  dc.b "  manual 1 eq {statusdict /manualfeed known {statusdict /manualfeed false put}if } if",CR,LF
  3253.  dc.b "  dmatrix setmatrix",CR,LF
  3254.  dc.b "} bdef",CR,LF
  3255.  dc.b CR,LF
  3256.  dc.b "%",CR,LF
  3257.  dc.b "% routines for setting halftone/pattern fill",CR,LF
  3258.  dc.b "%",CR,LF
  3259.  dc.b "/bpspotfunction {",CR,LF
  3260.  dc.b "    /yindex exch 1 add 8 mul cvi def",CR,LF
  3261.  dc.b "    /xindex exch 1 add 8 mul cvi def",CR,LF
  3262.  dc.b CR,LF
  3263.  dc.b "    bstring yindex 2 mul xindex 8 idiv add get",CR,LF
  3264.  dc.b "    1 7 xindex 8 mod sub bitshift",CR,LF
  3265.  dc.b "    and 0 ne {1} {0} ifelse",CR,LF
  3266.  dc.b "} bdef",CR,LF
  3267.  dc.b CR,LF
  3268.  dc.b "%",CR,LF
  3269.  dc.b "%",CR,LF
  3270.  dc.b "%",CR,LF
  3271.  dc.b "/PTRN {",CR,LF
  3272.  dc.b "  /shade xdef",CR,LF
  3273.  dc.b "  /bstring xdef",CR,LF
  3274.  dc.b CR,LF
  3275.  dc.b "  /cellsz 1536.0 def",CR,LF ;768
  3276.  dc.b CR,LF
  3277.  dc.b "  negative 1 eq {0 1 31 {bstring exch dup bstring exch get 255 exch sub put} for} if",CR,LF
  3278.  dc.b "  /spotfunction /bpspotfunction load def",CR,LF
  3279.  dc.b "  /m cellsz dup matrix scale cmatrix matrix concatmatrix def",CR,LF
  3280.  dc.b "  1 0 m dtransform /y1 xdef /x1 xdef",CR,LF
  3281.  dc.b CR,LF
  3282.  dc.b "  m 2 get m 1 get mul m 0 get m 3 get mul sub 0 gt",CR,LF
  3283.  dc.b "   {",CR,LF
  3284.  dc.b "    /spotfunction /proc1 { neg } cvlit def",CR,LF
  3285.  dc.b "    /proc2 /spotfunction load cvlit def",CR,LF
  3286.  dc.b "    proc1 length proc2 length add array",CR,LF
  3287.  dc.b "    dup 0 proc1 putinterval",CR,LF
  3288.  dc.b "    dup proc1 length proc2 putinterval",CR,LF
  3289.  dc.b "    cvx",CR,LF
  3290.  dc.b "    def",CR,LF
  3291.  dc.b "   } if",CR,LF
  3292.  dc.b CR,LF
  3293.  dc.b "   72 0 matrix defaultmatrix dtransform dup mul exch dup mul add sqrt",CR,LF
  3294.  dc.b "   x1 dup mul y1 dup mul add sqrt div  % new screen frequency",CR,LF
  3295.  dc.b "   y1 x1 atan              % new screen angle",CR,LF
  3296.  dc.b "   /spotfunction load      % new screen procedure",CR,LF
  3297.  dc.b "  setscreen",CR,LF
  3298.  dc.b "  {} settransfer",CR,LF
  3299.  dc.b CR,LF
  3300.  dc.b "  /onbits 0 def",CR,LF
  3301.  dc.b "  0 1 255",CR,LF
  3302.  dc.b "   {",CR,LF
  3303.  dc.b "    dup 8 idiv bstring exch get exch",CR,LF
  3304.  dc.b "     1 exch 7 exch 8 mod sub bitshift",CR,LF
  3305.  dc.b "     and 0 ne {/onbits onbits 1 add def} if",CR,LF
  3306.  dc.b "   } for",CR,LF
  3307.  dc.b "  1 onbits 256 div shade mul 10000 div sub setgray",CR,LF
  3308.  dc.b "} bdef",CR,LF
  3309.  dc.b CR,LF
  3310.  dc.b "%",CR,LF
  3311.  dc.b "%",CR,LF
  3312.  dc.b "%",CR,LF
  3313.  dc.b "/SHADE {",CR,LF
  3314.  dc.b "  /shade xdef",CR,LF
  3315.  dc.b "  cfreq cangle /dproc load setscreen",CR,LF
  3316.  dc.b "  /dtrans load settransfer",CR,LF
  3317.  dc.b "  1 shade 10000 div sub setgray",CR,LF
  3318.  dc.b "} bdef",CR,LF
  3319.  dc.b CR,LF
  3320.  dc.b "%",CR,LF
  3321.  dc.b "%",CR,LF
  3322.  dc.b "%",CR,LF
  3323.  dc.b "/CMYK {",CR,LF
  3324.  dc.b "  /k xdef",CR,LF
  3325.  dc.b "  /y xdef",CR,LF
  3326.  dc.b "  /m xdef",CR,LF
  3327.  dc.b "  /c xdef",CR,LF
  3328.  dc.b "  c 10000 div m 10000 div y 10000 div k 10000 div setcmykcolor",CR,LF
  3329.  dc.b "} bdef",CR,LF
  3330.  dc.b CR,LF
  3331.  dc.b CR,LF
  3332.  dc.b "%",CR,LF
  3333.  dc.b "% pixelw pixelh bitsperpixel picx picy pfreq pangle PUTPIC",CR,LF
  3334.  dc.b "%",CR,LF
  3335.  dc.b "/putpic {",CR,LF
  3336.  dc.b "  /pangle xdef",CR,LF
  3337.  dc.b "  /pfreq xdef",CR,LF
  3338.  dc.b "  /ysize xdef",CR,LF
  3339.  dc.b "  /xsize xdef",CR,LF
  3340.  dc.b "  /bpp xdef",CR,LF
  3341.  dc.b "  /h xdef",CR,LF
  3342.  dc.b "  /w xdef",CR,LF
  3343.  dc.b CR,LF
  3344.  dc.b "  pfreq 10000 lt {pfreq}{cfreq} ifelse",CR,LF
  3345.  dc.b "  pangle 10000 lt {pangle}{cangle} ifelse",CR,LF
  3346.  dc.b "  /dproc load setscreen",CR,LF
  3347.  dc.b "  xsize 2 div neg ysize 2 div neg translate",CR,LF
  3348.  dc.b "  xsize ysize scale",CR,LF
  3349.  dc.b "  /picstr 1 string def",CR,LF
  3350.  dc.b CR,LF
  3351.  dc.b "  w h bpp [w 0 0 h neg 0 h] {currentfile picstr readhexstring pop} image",CR,LF
  3352.  dc.b "} bdef",CR,LF
  3353.  dc.b CR,LF
  3354.  dc.b "%",CR,LF
  3355.  dc.b "% pixelw pixelh bitsperpixel picx picy pfreq pangle PUTRGBPIC",CR,LF
  3356.  dc.b "%",CR,LF
  3357.  dc.b "/putrgbpic {",CR,LF
  3358.  dc.b "  /pangle xdef",CR,LF
  3359.  dc.b "  /pfreq xdef",CR,LF
  3360.  dc.b "  /ysize xdef",CR,LF
  3361.  dc.b "  /xsize xdef",CR,LF
  3362.  dc.b "  /bpp xdef",CR,LF
  3363.  dc.b "  /h xdef",CR,LF
  3364.  dc.b "  /w xdef",CR,LF
  3365.  dc.b CR,LF
  3366.  dc.b "  pfreq 10000 lt {pfreq}{cfreq} ifelse",CR,LF
  3367.  dc.b "  pangle 10000 lt {pangle}{cangle} ifelse",CR,LF
  3368.  dc.b "  /dproc load setscreen",CR,LF
  3369.  dc.b "  xsize 2 div neg ysize 2 div neg translate",CR,LF
  3370.  dc.b "  xsize ysize scale",CR,LF
  3371.  dc.b "  /picstr 1 string def",CR,LF
  3372.  dc.b CR,LF
  3373.  dc.b "  w h bpp [w 0 0 h neg 0 h]  {currentfile picstr readhexstring pop} false 3 colorimage",CR,LF
  3374.  dc.b "} bdef",CR,LF
  3375.  dc.b CR,LF
  3376.  dc.b "%",CR,LF
  3377.  dc.b "% newx newy origx origy llx lly urx ury BGNEPS",CR,LF
  3378.  dc.b "%",CR,LF
  3379.  dc.b "/bgneps {",CR,LF
  3380.  dc.b "  /ury xdef",CR,LF
  3381.  dc.b "  /urx xdef",CR,LF
  3382.  dc.b "  /lly xdef",CR,LF
  3383.  dc.b "  /llx xdef",CR,LF
  3384.  dc.b "  /origy xdef",CR,LF
  3385.  dc.b "  /origx xdef",CR,LF
  3386.  dc.b "  /newy xdef",CR,LF
  3387.  dc.b "  /newx xdef",CR,LF
  3388.  dc.b "  100 newx origx div mul 100 newy origy div mul scale",CR,LF
  3389.  dc.b "  urx llx add -2 div ury lly add -2 div translate",CR,LF
  3390.  dc.b "  /PgsEpsSave save def /showpage {} bdef",CR,LF
  3391.  dc.b "  llx lly moveto llx ury lineto urx ury lineto urx lly lineto clip",CR,LF
  3392.  dc.b "  newpath [] 0 setdash 1 setlinewidth 0 setgray",CR,LF
  3393.  dc.b "} bdef",CR,LF
  3394.  dc.b CR,LF
  3395.  dc.b "/endeps {PgsEpsSave restore} bdef",CR,LF
  3396.  dc.b CR,LF
  3397.  dc.b CR,LF
  3398.  dc.b "/doendstyle {",CR,LF
  3399.  dc.b "  scl /taily exch def /tailx exch def",CR,LF
  3400.  dc.b "  scl /tipy exch def /tipx exch def",CR,LF
  3401.  dc.b "  gsave newpath 1 eq",CR,LF
  3402.  dc.b "  {",CR,LF
  3403.  dc.b "    /halfhead currentlinewidth dup 125 gt {1.5}{2} ifelse mul def",CR,LF
  3404.  dc.b "    /headlength halfhead 5 mul def",CR,LF
  3405.  dc.b "    /dx tipx tailx sub def",CR,LF
  3406.  dc.b "    /dy tipy taily sub def",CR,LF
  3407.  dc.b "    /arrowlength dx dx mul dy dy mul add sqrt def",CR,LF
  3408.  dc.b "    /angle dy dx atan def",CR,LF
  3409.  dc.b "    /base arrowlength headlength sub def",CR,LF
  3410.  dc.b "    tailx taily translate",CR,LF
  3411.  dc.b "    angle rotate",CR,LF
  3412.  dc.b "    base halfhead neg moveto",CR,LF
  3413.  dc.b "    arrowlength 0 lineto",CR,LF
  3414.  dc.b "    base halfhead lineto",CR,LF
  3415.  dc.b "    closepath fill",CR,LF
  3416.  dc.b "    base 0 transform",CR,LF
  3417.  dc.b "  }",CR,LF
  3418.  dc.b "  {",CR,LF
  3419.  dc.b "    tipx tipy currentlinewidth 2 div 0 360 arc fill",CR,LF
  3420.  dc.b "    tipx tipy transform",CR,LF
  3421.  dc.b "  } ifelse",CR,LF
  3422.  dc.b "  grestore itransform} bdef",CR,LF
  3423.  dc.b "  /BS {doendstyle moveto} bdef",CR,LF
  3424.  dc.b "  /ES {doendstyle lineto MS} bdef",CR,LF
  3425.  dc.b CR,LF
  3426.  dc.b CR,LF
  3427.  dc.b "%",CR,LF
  3428.  dc.b "% font xpoint ypoint attribute SETFP",CR,LF
  3429.  dc.b "%",CR,LF
  3430.  dc.b "/sfpm [0 0 0 0 0 0] def",CR,LF
  3431.  dc.b "/setfp {",CR,LF
  3432.  dc.b "  /curattr xdef /curypoint xdef /curxpoint xdef /curfont xdef",CR,LF
  3433. ; dc.b CR,LF
  3434. ; dc.b "  curfont ==",CR,LF
  3435.  dc.b CR,LF
  3436.  dc.b "  sfpm 0 curxpoint put",CR,LF
  3437.  dc.b "  sfpm 3 curypoint put",CR,LF
  3438.  dc.b "  curfont findfont sfpm",CR,LF
  3439.  dc.b "  dup 2 0 put",CR,LF
  3440.  dc.b "  2 curattr and 0 ne {dup 2 curypoint 3 div put} if",CR,LF
  3441.  dc.b "  16 curattr and 0 ne {dup 2 curypoint 3 div neg put} if",CR,LF
  3442.  dc.b "  128 curattr and 0 ne {dup 0 curxpoint neg put} if",CR,LF
  3443.  dc.b "  256 curattr and 0 ne {dup 3 curypoint neg put} if",CR,LF
  3444.  dc.b "  makefont setfont",CR,LF
  3445.  dc.b "} bdef",CR,LF
  3446.  dc.b CR,LF
  3447.  dc.b "%",CR,LF
  3448.  dc.b "% cwidth A",CR,LF
  3449.  dc.b "%",CR,LF
  3450.  dc.b "/a {/cwidth xdef",CR,LF
  3451.  dc.b CR,LF
  3452.  dc.b "% reverse",CR,LF
  3453.  dc.b " 64 curattr and 0 ne",CR,LF
  3454.  dc.b "  {gsave 0 curypoint .75 mul rmoveto cwidth 0 rlineto",CR,LF
  3455.  dc.b "   0 curypoint neg rlineto cwidth neg 0 rlineto closepath fill grestore",CR,LF
  3456.  dc.b "   gsave 1 setgray } if",CR,LF
  3457.  dc.b CR,LF
  3458.  dc.b "% underline",CR,LF
  3459.  dc.b " 512 curattr and 0 ne",CR,LF
  3460.  dc.b "  {curypoint 40 div setlinewidth [] 0 setdash",CR,LF
  3461.  dc.b "   gsave 0 curypoint .05 mul neg rmoveto",CR,LF
  3462.  dc.b "   cwidth 0 rlineto stroke grestore} if",CR,LF
  3463.  dc.b CR,LF
  3464.  dc.b "% double underline",CR,LF
  3465.  dc.b " 4096 curattr and 0 ne",CR,LF
  3466.  dc.b "  {curypoint 40 div setlinewidth [] 0 setdash",CR,LF
  3467.  dc.b "   gsave 0 curypoint .05 mul neg rmoveto",CR,LF
  3468.  dc.b "   cwidth 0 rlineto stroke grestore",CR,LF
  3469.  dc.b "   gsave 0 curypoint .15 mul neg rmoveto",CR,LF
  3470.  dc.b "   cwidth 0 rlineto stroke grestore} if",CR,LF
  3471.  dc.b CR,LF
  3472.  dc.b "% strike through",CR,LF
  3473.  dc.b " 8192 curattr and 0 ne",CR,LF
  3474.  dc.b "  {curypoint 40 div setlinewidth [] 0 setdash",CR,LF
  3475.  dc.b "   gsave 0 curypoint .3 mul rmoveto",CR,LF
  3476.  dc.b "   cwidth 0 rlineto stroke grestore} if",CR,LF
  3477.  dc.b "%",CR,LF
  3478.  dc.b " 64 curattr and 0 ne",CR,LF
  3479.  dc.b "   {grestore} if",CR,LF
  3480.  dc.b CR,LF
  3481.  dc.b " } bdef",CR,LF
  3482.  dc.b CR,LF
  3483.  dc.b "%",CR,LF
  3484.  dc.b "% cwidth newx newy B",CR,LF
  3485.  dc.b "%",CR,LF
  3486.  dc.b "/b {newpath scl moveto a} bdef",CR,LF
  3487.  dc.b CR,LF
  3488.  dc.b "%",CR,LF
  3489.  dc.b "% cchar cwidth R",CR,LF
  3490.  dc.b "%",CR,LF
  3491.  dc.b "/r {/cwidth xdef /cchar xdef",CR,LF
  3492.  dc.b CR,LF
  3493.  dc.b "gsave",CR,LF
  3494.  dc.b CR,LF
  3495.  dc.b "curattr 0 eq {cchar show}",CR,LF
  3496.  dc.b "{",CR,LF
  3497.  dc.b "% reverse",CR,LF
  3498.  dc.b " 64 curattr and 0 ne",CR,LF
  3499.  dc.b "   {1 setgray} if",CR,LF
  3500.  dc.b CR,LF
  3501.  dc.b "% shadow",CR,LF
  3502.  dc.b " 4 curattr and 0 ne",CR,LF
  3503.  dc.b "  {curypoint 160 div setlinewidth [] 0 setdash",CR,LF
  3504.  dc.b "   32 curattr and 0 ne",CR,LF
  3505.  dc.b "  {64 curattr and 0 ne",CR,LF
  3506.  dc.b "   {gsave .5 setgray curxpoint 12 div curypoint 12 div neg rmoveto cchar show grestore",CR,LF
  3507.  dc.b "    gsave cchar show grestore}",CR,LF
  3508.  dc.b "   {gsave currentgray 1 add .5 mul setgray curxpoint 12 div curypoint 12 div neg rmoveto cchar show grestore",CR,LF
  3509.  dc.b "    gsave cchar show grestore} ifelse",CR,LF
  3510.  dc.b "   }",CR,LF
  3511.  dc.b CR,LF
  3512.  dc.b "  {64 curattr and 0 ne",CR,LF
  3513.  dc.b "   {gsave curxpoint 12 div curypoint 12 div neg rmoveto cchar show grestore",CR,LF
  3514.  dc.b "    gsave 0 setgray cchar show grestore",CR,LF
  3515.  dc.b "    gsave cchar true charpath stroke grestore}",CR,LF
  3516.  dc.b "   {gsave curxpoint 12 div curypoint 12 div neg rmoveto cchar show grestore",CR,LF
  3517.  dc.b "    gsave 1 setgray cchar show grestore",CR,LF
  3518.  dc.b "    gsave cchar true charpath stroke grestore} ifelse",CR,LF
  3519.  dc.b "   } ifelse",CR,LF
  3520.  dc.b "  } if",CR,LF
  3521.  dc.b CR,LF
  3522.  dc.b "% outline",CR,LF
  3523.  dc.b " 8 curattr and 0 ne",CR,LF
  3524.  dc.b "  {curypoint 160 div setlinewidth [] 0 setdash",CR,LF
  3525.  dc.b "   64 curattr and 0 eq {gsave 1 setgray cchar show grestore} if",CR,LF
  3526.  dc.b "   gsave cchar true charpath stroke grestore} if",CR,LF
  3527.  dc.b CR,LF
  3528.  dc.b "% light",CR,LF
  3529.  dc.b " 32 curattr and 0 ne",CR,LF
  3530.  dc.b "  {64 curattr and 0 ne {.5} {currentgray 1 add .5 mul} ifelse setgray} if",CR,LF
  3531.  dc.b CR,LF
  3532.  dc.b "% mirror",CR,LF
  3533.  dc.b " 128 curattr and 0 ne",CR,LF
  3534.  dc.b "  {cchar stringwidth pop neg 0 rmoveto} if",CR,LF
  3535.  dc.b CR,LF
  3536.  dc.b "% upside down",CR,LF
  3537.  dc.b " 256 curattr and 0 ne",CR,LF
  3538.  dc.b "  {0 curypoint .6 mul rmoveto} if",CR,LF
  3539.  dc.b CR,LF
  3540.  dc.b "%",CR,LF
  3541.  dc.b " curattr 12 and 0 eq",CR,LF
  3542.  dc.b "  { curattr 1 and 0 ne",CR,LF
  3543.  dc.b "    {curxpoint 48 div dup neg -10 exch",CR,LF
  3544.  dc.b "      {gsave 0 rmoveto cchar show grestore} for}",CR,LF
  3545.  dc.b "    {cchar show}ifelse",CR,LF
  3546.  dc.b "  }if",CR,LF
  3547.  dc.b "} ifelse",CR,LF
  3548.  dc.b CR,LF
  3549.  dc.b " grestore cwidth 0 rmoveto} bdef",CR,LF
  3550.  dc.b CR,LF
  3551.  dc.b "%",CR,LF
  3552.  dc.b "% cchar cwidth newx newy P",CR,LF
  3553.  dc.b "%",CR,LF
  3554.  dc.b "/p {newpath scl moveto r} bdef",CR,LF
  3555.  dc.b CR,LF
  3556.  dc.b "end",CR,LF
  3557.  dc.b "%%EndProlog",CR,LF
  3558.  dc.b CR,LF
  3559.  dc.b "AsphaltDict begin",CR,LF
  3560.  dc.b 0
  3561.  
  3562.  
  3563. ;%%BeginDocument: Not Available
  3564. ;%%EndDocument
  3565. ;
  3566. ;%%BeginFont: PostScript Downloaded FontName
  3567. ;%%EndFont
  3568. ;
  3569. ;%%BeginProcessColor: Cyan
  3570. ;%%EndProcessColor
  3571. ;
  3572. ;%%BeginCustomColor: EllenRed
  3573. ;%%CMYKCustomColor: cyan magenta yellow black EllenRed
  3574. ;%%EndCustomColor
  3575. ;
  3576. ;%%Page: label ordinal
  3577. ;%%PageFonts:
  3578. ;%%BeginPageSetup
  3579. ;%%EndPageSetup
  3580. ;
  3581. ;%%BeginObject:
  3582. ;%%EndObject
  3583. ;
  3584. ;%%PageTrailer
  3585. ;
  3586. ;%%Trailer
  3587. ;%followed by the clean-up code
  3588.  
  3589. dmfstr1:
  3590.  dc.b "% COPYRIGHT 1988-1990",CR,LF
  3591.  dc.b "% Soft-Logik Publishing Corp",CR,LF
  3592.  dc.b "%  11131 F South Towne Sq.",CR,LF
  3593.  dc.b "%  St. Louis  MO  63123",CR,LF
  3594.  dc.b "%  (314) 894-8608",CR,LF
  3595.  dc.b "% No Reproduction, In Whole Or Part, Without Permission.",CR,LF
  3596.  dc.b CR,LF
  3597.  dc.b "/BuildCharDict 20 dict def",CR,LF
  3598.  dc.b "/KazFont 14 dict def",CR,LF
  3599.  dc.b "KazFont begin",CR,LF
  3600.  dc.b "/WidthFactor 1.0 def",CR,LF
  3601.  dc.b "/FontType 3 def",CR,LF
  3602.  dc.b "/FontMatrix [.001 0 0 .001 0 0] def",CR,LF
  3603.  dc.b "/FontBBox [-75 -200 1238 800] def",CR,LF
  3604.  dc.b "/Mx 256 array def",CR,LF
  3605.  dc.b "0 1 255 {Mx exch 0 put} for",CR,LF
  3606.  dc.b "/Encoding 256 array def",CR,LF
  3607.  dc.b "0 1 255 {Encoding exch /.notdef put} for",CR,LF
  3608.  dc.b "/CharacterDefs 257 dict def",CR,LF
  3609.  dc.b "CharacterDefs /.notdef {} put",CR,LF
  3610.  dc.b 0
  3611.  
  3612.  
  3613. dmfstr2:    dc.b    "Mx ",0
  3614. dmfstr3:    dc.b    "put",CR,LF,0
  3615. dmfstr4:    dc.b    "Encoding ",0
  3616. dmfstr5:    dc.b    "CharacterDefs /",0
  3617. dmfstr6:    dc.b    CR,LF,"{ ",0
  3618. dmfstr7:    dc.b    "} put",CR,LF,0
  3619. dmfnp:    dc.b    "n",CR,LF,0
  3620. dmfcp:    dc.b    "e",CR,LF,0
  3621. dmffp:    dc.b    "f",CR,LF,0
  3622. dmfsp:    dc.b    "s",CR,LF,0
  3623. dmfmt:    dc.b    "m",CR,LF,0
  3624. dmflt:    dc.b    "l",CR,LF,0
  3625. dmfct:    dc.b    "c",CR,LF,0
  3626. dmfa:    dc.b    "a",CR,LF,0
  3627. dmfan:    dc.b    "an",CR,LF,0
  3628.  
  3629. dmfstr8:
  3630.  dc.b "/BuildChar",CR,LF
  3631.  dc.b "{BuildCharDict begin",CR,LF
  3632.  dc.b "/char exch def",CR,LF
  3633.  dc.b "/fontdict exch def",CR,LF
  3634.  dc.b "/width fontdict /Mx get char get def",CR,LF
  3635.  dc.b "/charname fontdict /Encoding get char get def",CR,LF
  3636.  dc.b "/charproc fontdict /CharacterDefs get charname get def",CR,LF
  3637.  dc.b CR,LF
  3638.  dc.b "width 0 0 -200 1333 800 setcachedevice",CR,LF
  3639.  dc.b CR,LF
  3640.  dc.b "gsave",CR,LF
  3641.  dc.b "/f {eofill} def",CR,LF
  3642.  dc.b "/s {stroke} def",CR,LF
  3643.  dc.b "/n {newpath} def",CR,LF
  3644.  dc.b "/e {closepath} def",CR,LF
  3645.  dc.b "/m {transform round exch round exch itransform moveto} def",CR,LF
  3646.  dc.b "/l {transform round exch round exch itransform lineto} def",CR,LF
  3647.  dc.b "/c {transform round exch round exch itransform 6 2 roll",CR,LF
  3648.  dc.b "transform round exch round exch itransform 6 2 roll",CR,LF
  3649.  dc.b "transform round exch round exch itransform 6 2 roll",CR,LF
  3650.  dc.b "curveto} def",CR,LF
  3651.  dc.b "/a {arc} def",CR,LF
  3652.  dc.b "/an {arcn} def",CR,LF
  3653.  dc.b "0 setlinecap 0 setlinejoin 48 setlinewidth .5 setflat charproc",CR,LF
  3654.  dc.b "grestore",CR,LF
  3655.  dc.b "end",CR,LF
  3656.  dc.b "} def",CR,LF
  3657.  dc.b "end",CR,LF,CR,LF,"/"
  3658.  dc.b 0
  3659.  
  3660. dmfstr9:
  3661.  dc.b " KazFont definefont pop",CR,LF
  3662.  dc.b 0
  3663.  
  3664.  
  3665. t1index:
  3666.     dc.b    $00,$01,$02,$03,$04,$05,$06,$07
  3667.     dc.b    $08,$09,$0a,$0b,$0c,$0d,$0e,$0f
  3668.     dc.b    $10,$11,$12,$13,$14,$15,$16,$17
  3669.     dc.b    $18,$19,$1a,$1b,$1c,$1d,$1e,$1f
  3670.     dc.b    $20,$21,$22,$23,$24,$25,$26,$27
  3671.     dc.b    $28,$29,$2a,$2b,$2c,$2d,$2e,$2f
  3672.     dc.b    $30,$31,$32,$33,$34,$35,$36,$37
  3673.     dc.b    $38,$39,$3a,$3b,$3c,$3d,$3e,$3f
  3674.     dc.b    $40,$41,$42,$43,$44,$45,$46,$47
  3675.     dc.b    $48,$49,$4a,$4b,$4c,$4d,$4e,$4f
  3676.     dc.b    $50,$51,$52,$53,$54,$55,$56,$57
  3677.     dc.b    $58,$59,$5a,$5b,$5c,$5d,$5e,$5f
  3678.     dc.b    $60,$61,$62,$63,$64,$65,$66,$67
  3679.     dc.b    $68,$69,$6a,$6b,$6c,$6d,$6e,$6f
  3680.     dc.b    $70,$71,$72,$73,$74,$75,$76,$77
  3681.     dc.b    $78,$79,$7a,$7b,$7c,$7d,$7e,$7f
  3682.     dc.b    $80,$81,$82,$83,$84,$85,$86,$87
  3683.     dc.b    $88,$89,$8a,$8b,$8c,$8d,$8e,$8f
  3684.     dc.b    $90,$91,$92,$93,$94,$95,$96,$97
  3685.     dc.b    $98,$99,$9a,$9b,$9c,$9d,$9e,$9f
  3686.     dc.b    $a0,$a1,$a2,$a3,$a4,$a5,$a6,$a7
  3687.     dc.b    $a8,$aa,$ba,$ab,$b7,$b1,$d0,$bc
  3688.     dc.b    $b0,$b1,$b2,$b3,$b4,$b5,$b6,$b7
  3689.     dc.b    $b8,$b9,$ba,$bb,$bc,$bd,$be,$bf
  3690.     dc.b    $c0,$c1,$c2,$c3,$c4,$c5,$c6,$c7
  3691.     dc.b    $c8,$c9,$ca,$cb,$cc,$cd,$ce,$cf
  3692.     dc.b    $d0,$d1,$d2,$d3,$d4,$d5,$d6,$d7
  3693.     dc.b    $d8,$d9,$da,$db,$dc,$dd,$de,$df
  3694.     dc.b    $e0,$e1,$e2,$e3,$e4,$e5,$e6,$e7
  3695.     dc.b    $e8,$e9,$ea,$eb,$ec,$ed,$ee,$ef
  3696.     dc.b    $f0,$f1,$f2,$f3,$f4,$f5,$f6,$f7
  3697.     dc.b    $f8,$f9,$fa,$fb,$fc,$fd,$fe,$ff
  3698.  
  3699. *
  3700. *
  3701. hex:        dc.b    "0123456789ABCDEF"
  3702.  
  3703. austr:        dc.b    "auto-unload",0
  3704. pustr:        dc.b    "page-unload",0
  3705. freqstr:    dc.b    "f[",0
  3706. anglestr:    dc.b    "a[",0
  3707. clrstr:        dc.b    "color",0
  3708. bldstr:        dc.b    "bleed[",0
  3709.  
  3710.  
  3711. cyanplate:    dc.b    "%%CyanPlate: ",0
  3712. magentaplate:    dc.b    "%%MagentaPlate: ",0
  3713. yellowplate:    dc.b    "%%YellowPlate: ",0
  3714. blackplate:    dc.b    "%%BlackPlate: ",0
  3715. includestr:    dc.b    "%%IncludeFile: ",QUOTE,0
  3716.  
  3717. driver:        dc.b    "PostScript v2.1.13",0
  3718.  
  3719.  SECTION printer,BSS,PUBLIC
  3720. array:        ds.w    20
  3721. table:        ds.l    1
  3722. yinvert:    ds.l    1
  3723. v_base:        ds.l    1
  3724. w:        ds.w    1
  3725. h:         ds.w    1
  3726. pwidth:        ds.l    1
  3727. plane:        ds.l    1
  3728. bitpln:        ds.w    1
  3729. palptr:        ds.l    1
  3730. picptr:        ds.l    1
  3731. pixel:        ds.w    1
  3732. pmode:        ds.w    1
  3733. pptr:        ds.l    1
  3734. count:        ds.w    1
  3735. attribute:    ds.l    1
  3736. curfmetric:    ds.l    1
  3737. curfont:    ds.l    1
  3738. curftype:    ds.w    1
  3739. curfmtype:    ds.w    1
  3740. fontlist:    ds.l    1
  3741. fontoff:    ds.l    1
  3742. curpsxdpi:    ds.w    1
  3743. curpsydpi:    ds.w    1
  3744. curpsxpoint:    ds.w    1
  3745. curpsypoint:    ds.w    1
  3746.  
  3747. f_hndl:        ds.w    1
  3748. pattr:        ds.l    1
  3749. cyan:        ds.w    1
  3750. magenta:    ds.w    1
  3751. yellow:        ds.w    1
  3752. black:        ds.w    1
  3753. p_cyan:        ds.w    1
  3754. p_magenta:    ds.w    1
  3755. p_yellow:    ds.w    1
  3756. p_black:    ds.w    1
  3757. cintensity:    ds.w    1
  3758. *
  3759. cx:        ds.l    1
  3760. cy:        ds.l    1
  3761. pcx:        ds.l    1
  3762. pcy:        ds.l    1
  3763. char:        ds.b    1
  3764. pchar:        ds.b    1
  3765. *
  3766. compress:    ds.b    256
  3767. packptr:    ds.l    1
  3768. packlen:    ds.w    1
  3769. packbyte:    ds.w    1
  3770. packcount:    ds.w    1
  3771. *
  3772. curx:        ds.l    1
  3773. cury:        ds.l    1
  3774.  
  3775. bpp:        ds.w    1
  3776. bcnt:        ds.w    1
  3777. bdata:        ds.w    1
  3778.  
  3779. linestyle:    ds.w    1
  3780. linewidth:    ds.w    1
  3781. fillstyle:    ds.w    1
  3782. bgnstyle:    ds.b    1
  3783. endstyle:    ds.b    1
  3784. bflag:        ds.b    1
  3785. eflag:        ds.b    1
  3786. downflag:    ds.b    1
  3787. auto_unload:    ds.b    1
  3788. colorprt:    ds.b    1
  3789.         ds.b    1
  3790. downoff:    ds.l    1
  3791. bx1:        ds.l    1
  3792. by1:        ds.l    1
  3793. bx2:        ds.l    1
  3794. by2:        ds.l    1
  3795. ex1:        ds.l    1
  3796. ey1:        ds.l    1
  3797. ex2:        ds.l    1
  3798. ey2:        ds.l    1
  3799.  
  3800. mfreq:        ds.l    10
  3801. mangle:        ds.l    10
  3802. macount:    ds.w    1
  3803. mfcount:    ds.w    1
  3804. mfcur:        ds.w    1
  3805. macur:        ds.w    1
  3806. mfpage:        ds.l    1
  3807. mapage:        ds.l    1
  3808.  
  3809. char_cx:    ds.w    1
  3810. char_cy:    ds.w    1
  3811. charpath:    ds.l    1
  3812. endp:        ds.l    1
  3813. crlfcnt:    ds.w    1
  3814. bleedv:        ds.l    1
  3815. bleedh:        ds.l    1
  3816.  
  3817.  
  3818. ; 2.1.12 - fixed problem with EPS files
  3819. ; 2.1.13 - fixed crop®mark bleed standoff
  3820.